|
From: <at...@su...> - 2004-04-02 06:58:17
|
> how to use string with dev c++ i tried everything by
It might be useful to specify your question.
Generally there is no difference, using strings with Dev C++ or with an
other IDE:
#include<iostream> // for cout ( and others )
#include<cstring> // for string
...
string xy; // defined
xy = "something"; // assign a content (and allocate the necessay memory)
xy..append("\nsomething else in a new line"); // appending this to the
existing content (and expand the necessay memory)
cout<<"Content of xy: " << xy << endl; // Showing the content
...
Have a look to C++ string-"management", eg. at
http://www.cppreference.com/cppstring.html
Regards
Achim
|