Re: [Dev-C++] Casting of int to string
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2007-05-07 06:34:40
|
You can't cast an int to string, and you cant cast a string to an integer. Either use strtol(), atoi() or similar to convert the string to an integer, or use sprintf() or similar to convert the integer to a string. /pwm On Mon, 7 May 2007, Jan Mura wrote: > Hello, > > I would like to compare an integer with a string using strcmp(). So I need > to cast the int type to string (*char). Is there some commone way how to do > it. Should I use & operator and adress of int in teh function? Or something > else? > > Thank you very much > > Jan Mura > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |