Is there a similar function like string::append in cstring lib???? for c-style strings (char*) ???
Is there a similar function like string::append in cstring lib???? for c-style strings (char*) ???
strcat() and strncat(). Google them. They should be in string.h
k ty
any function which converts an integer into string ???
i know of itoa() but its non-standard any other????? trick ?? way ??? help or hint plzzz
Last edited by manzoor; 10-29-2008 at 08:05 AM.
sprintf()?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
You could add '0' to each number and convert it to a string.
You could use a string stream
Note using stringstreams, you can convert strings to numbers, numbers to strings, or anything to anything that streams have operator<< and operator>> for.Code:#include <sstream> #include <iostream> using namespace std; int main(int argc, char **argv) { char myString[] = "342"; stringstream s; int a; s << myString; s >> a; cout << a << endl; }
Programming Your Mom. http://www.dandongs.com/