Implementation of the definition class - c++ program, C/C++ Programming

Assignment Help:

Implementation of the Definition class:

void Definition::put_word(char *s)

{

   word = new char[strlen(s)+1];

   strcpy(word,s);

   nmeanings = 0;

}

 

void Definition::add_meaning(char *s)

{

   if (nmeanings < Maxmeans)

   {

      meanings[nmeanings] = new char[strlen(s)+1];

      strcpy(meanings[nmeanings++],s);

   }

}

 

char * Definition::get_meaning(int level, char *s)

{

   if (0 <= level && level < nmeanings)

      return strcpy(s,meanings[level]);

   else

      return 0;                                // line 27

}


Related Discussions:- Implementation of the definition class - c++ program

Explain automatic variables, Automatic Variables Automatic variables ar...

Automatic Variables Automatic variables are variable which are explained within the functions. They lose their value when the function terminates. It can be accessed only in th

How the operations are performed in a single linked list, Question: (a)...

Question: (a) Explain a linked list. (b) Describe the three different types of linked list with the help of diagrams. (c) Give two advantages and two disadvantages

Rules of function, Rules of function: Inline function created witho...

Rules of function: Inline function created without prototype it reduces the memory and it is used only for small function. Inline function cannot have recursion, static var

Integer variable, how do you declare an integer variable

how do you declare an integer variable

Develop g-code generating software, Develop G-code generating software P...

Develop G-code generating software Project Description: I'm presently using Slicer on a polymer jetting 3d printer. The toolpaths were thought out for FDM printers and thus a

Define and explain flow chart with an example, C Programming and Data Struc...

C Programming and Data Structures 1. Define and explain flow chart with an example. 2. Write an algorithm to print all even numbers in descending order and draw the flowcha

Function, write a function named "fact"that takes one integer arguments,ca...

write a function named "fact"that takes one integer arguments,call them "num" and returns as ..............

Data structure, convert BST into sorted doubly linked list

convert BST into sorted doubly linked list

What do you meant by linear search, Question : (a) One of the most co...

Question : (a) One of the most common sorting techniques we have in programming is the ‘Bubble Sort'. This technique will be used to sort an array of elements in ascending or

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd