You are here:

C++/strings program

Advertisement


Question
how to construct a class that will contain strings of any size and
objects
of the class are to use the following :
Declarations:
   string astring;
   string anotherstring("duck");
   string yetanotherstring(astring);
   string aname= "donald";
   string anothername =aname;
Tester:
 if (astring==anotherstring)...
 if (astring=="daisy")..
 if (astring!=anotherstring)..
 if (astring!="Hewey")...

Lexical comparisions (<,>,>=,<= )
if (astring<anotherstring)...
if (astring<"louie")...
if (astring<=anotherstring)...

Concatenation of two strings
astring==anotherstring + aname;
astring=aname+"duck",


Answer
Dear Praveen,
Thankyou for your question. Well i am not currently understanding what you want me to explain to you.
It means that, provide the exact details of your question.
What you exactly wana do in it? Do you want me to write a
complete C++ program or just Pseudocode to tell you.
In any case, please make the problem statement more clear.
Regards
Professional

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Professional

Expertise

I can answer any question about functions,pointers,structures,object oriented programming basics of classes and data structures.My strong field is structured programming.

Experience

I have got 2 years experiece under C . I am able to answer about the structured concepts pointers to a little extent,OOP concepts. I have also experience in data Strucutres like Linked List, Stacks , Queues, Heaps, B Trees, Red Black Trees. I will try to satisfy with my knowledge. I am the Student of an expert here Martin, what i have learnt today, i just owe my every knowledge to him. He is the greatest.

©2016 About.com. All rights reserved.