Computer Science Canada

addition of strings in c++

Author:  halo3d [ 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?

Author:  halo3d [ Sat Nov 11, 2006 1:05 pm ]
Post subject: 

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

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

Author:  wtd [ Sat Nov 11, 2006 2:35 pm ]
Post 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?

Author:  halo3d [ Sat Nov 11, 2006 2:41 pm ]
Post subject: 

o i used the

code:
#include <string>


and it works now Very Happy


: