Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 addition of strings in c++
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
halo3d




PostPosted: Sat Nov 11, 2006 1:02 pm   Post subject: addition of strings in c++

hi i just started learning c++. I have been using turing and java but i thought its always best to start learning as a total newbie Razz

well i was trying to make a program using functions and i had some problem adding strings e.g.

if string a is "hello"
string b is "world"

string c should add a and b so its stores the string "helloworld"

the + thing doesnt work like it does in java or turing..

any help?
Sponsor
Sponsor
Sponsor
sponsor
halo3d




PostPosted: Sat Nov 11, 2006 1:05 pm   Post subject: (No subject)

p.s. im using visual c++ .net 2003

why cant i edit my posts... Evil or Very Mad
wtd




PostPosted: Sat Nov 11, 2006 2:35 pm   Post subject: (No subject)

Posts in the Help forums may not be edited. This ability was heavily abused, and has therefore been removed.

As for your question...

Are you use the std::string class?
halo3d




PostPosted: Sat Nov 11, 2006 2:41 pm   Post subject: (No subject)

o i used the

code:
#include <string>


and it works now Very Happy
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: