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

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

}

Posted Date: 10/18/2012 6:42:36 AM | Location : United States







Related Discussions:- Implementation of the definition class - c++ program, Assignment Help, Ask Question on Implementation of the definition class - c++ program, Get Answer, Expert's Help, Implementation of the definition class - c++ program Discussions

Write discussion on Implementation of the definition class - c++ program
Your posts are moderated
Related Questions
Define some features of static storage class in c program? The features of a variable defined to contain a static storage class are as follows. Storage - memory Default

Want an EA project for Jack Bsher Project Description: New EA game Skills required   Android, C++ Programming, PHP, Metatrader, SQL

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

write aprogram for random -search to implement if a[i]=x;then terminate other wise continue the search by picking new randon inex into a

Algorithm for railway ticket booking process

Project Description: We are seeking someone to search mp3 link form audio or m3u8 for videos. Skills required are .NET, C Programming, Engineering, C# Programming

how can i write reverse digit function like writing 1234 and printing 4321


Want a scraping program created Project Description: We need to hire a professional developer to scrape the site for information such as *product title *Product Price

Inbuilt Functions i).  Functions to manipulate strings The cstring library defines many functions to perform some manipulation operations with C-styled functions. The followi