I have a problem with c++ , I need String type for my program , but c++ have'nt the String type , is there any trick I can have variables in String type in my c++ program ?
C++ question?
No, you actually don't have that big a problem with C++. There isn't a built-in type string, but there is a string object available if you use the statement '#include %26lt;string%26gt;'. It includes an object library that handles strings and string functions quite thoroughly. For more information on this and other things C and C++, try out the reference at the URL below.
Reply:check that. I'm pretty sure it's not #include %26lt;string%26gt; that you want to add. it should be:
#include %26lt;string.h%26gt;
I'm no expert at C++; I use C. Although enough is similar and I'm sure that's no different.
You'll probably want to use a variable along the lines of:
char variable_name[1024];
(The [1024] is a parameter for memory allocation )
The above could be used in C. Again, no expert with C++. I'm sure, however, that it's the same underlying concept.
Reply:i think u use something like #include%26lt;string%26gt; or something like that.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment