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

Flow chart, flow chart for calculating the volume of sphere

flow chart for calculating the volume of sphere

Define bitwise-and operator, Define Bitwise-AND Operator: &:? The bitwi...

Define Bitwise-AND Operator: &:? The bitwise-AND operator (&) compares every bit of its first operand to the corresponding bit of its second operand. If both bits are 1 the mat

Palindrome, A palindrome is a string that reads the same from both the ends...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Insert values in queue - c++ program, Insert values in queue - C++ program:...

Insert values in queue - C++ program: Write a program to insert values in queue. int main()   {         int k;     Queue timeLine;     cout     for(

Big-m method, big-m method operation reseach in progrmme c++..

big-m method operation reseach in progrmme c++..

Explain procedural logic, Explain procedural logic A procedure, or func...

Explain procedural logic A procedure, or function, was explained as a set of specific instructions implemented in sequential manner. The data is kept separate from the procedur

What is the difference between javascript and php, What is the difference b...

What is the difference between JavaScript and PHP? The difference lies with the execution of languages. PHP is server side scripting language, which means that it cannot intera

We want network-social app, We are seeking a talented developer/team with g...

We are seeking a talented developer/team with great experience in programming apps for both Android and iOS. Our project needs great skills and experience in making good functional

I want application to generate premium, Project Description: We want to ...

Project Description: We want to generate premium numbers for one of our application. What we need is: A program that generate 2, 3, 4, 5, 6, 7, 8 digits premium numbers

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