dev-cpp-users Mailing List for Dev-C++ (Page 750)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: ARI F. <ari...@ju...> - 2000-12-10 00:54:45
|
i keep on getting this error message C:\DEV-C_~1\BIN\ld.exe: cannot open crt2.o: No such file or directory |
From: Morka <mo...@fr...> - 2000-12-09 21:24:31
|
I am a very beginner of programming at all. I decided for learnig c++ = with dev-c++. Now I have the following problem: compiling sources including "conio.h" = always leads to the error messages: =20 warning: `__cdecl__' attribute directive ignored in line 139 from conio.h which is: - extern int _RTLENTRY _EXPDATA _wscroll; Does somebody know what is going wrong here ? =20 Thanks Chris =20 |
From: Nichlas <car...@ho...> - 2000-12-09 18:36:17
|
I here by confirm to to recieve info from the mailling list Carbonn |
From: Elias P. <Eli...@ao...> - 2000-12-09 12:40:37
|
> I'm trying to compile a direct x program and I keep > getting the following error message > c:\my documents\main.o(.text+0x1d0):main.cpp: > undefined reference to `DirectDrawCreateEx@16' > > Does anyone knows how can I stop getting this error. I > have the following option "-fvtable-thunks" set, as > well as linking to libraries ddraw & dxguid. Also the > include files are set. Is there anything else I need > to set. Maybe you are linking to an old version of ddraw ? I think you need at least DX7 to have the function 'DirectDrawCreateEx', before you only have 'DirectDrawCreate'. I remember there was a DirectX 7.0 package for dev-c++ available from the dev-c++ website, if you use it there shouldn't be any problems with compiling. Elias Pschernig |
From: Paul V. <van...@pr...> - 2000-12-09 12:27:14
|
It is a .zip file so you need to unzip it. If you have Winzip installed on your computer you should just be able to double click on it. Then extract the files to a temporary directory (maybe c:\windows\temp ). Once extracted, go to that directory, and open the setup.exe file. If you don't have winzip you can get it here: http://www.winzip.com Once you've installed it, you can delete the extracted setup files. ----- Original Message ----- From: zhusain To: dev...@li... Sent: Friday, December 08, 2000 11:25 PM Subject: [Dev-C++] Devcpp4 - Installation This may look preliminary.However I need help to get the programme running after I have down loaded the programme on my hard disk. Thanks |
From: zhusain <zh...@bo...> - 2000-12-09 06:27:51
|
This may look preliminary.However I need help to get the programme = running after I have down loaded the programme on my hard disk. Thanks |
From: Ana R. <inq...@ya...> - 2000-12-08 20:53:39
|
I'm trying to compile a direct x program and I keep getting the following error message c:\my documents\main.o(.text+0x1d0):main.cpp: undefined reference to `DirectDrawCreateEx@16' Does anyone knows how can I stop getting this error. I have the following option "-fvtable-thunks" set, as well as linking to libraries ddraw & dxguid. Also the include files are set. Is there anything else I need to set. Thanks Eliud __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ |
From: James G. <Jam...@Cl...> - 2000-12-08 09:07:36
|
Your using strstream the wrong way, in the code below I'm using ostrstream (output string stream) to be able to use the << operators. #include <string> #include <iostream> #include <strstream> using namespace std; int main(int argc, char *argv[]) { string MyString; char MyChar[200]; ((MyString += "John has ") += "4") += " apples!"; cout << MyString << endl; // Wrap the char in an ostratream to enable the use of '<<' operator the same as cout etc. ostrstream(MyChar, sizeof(MyChar)) << "John has " << 10 << " apples!" << ends; MyString = MyChar; cout << MyString << endl; return 0; } Regards, James. -----Original Message----- From: Chad Simmons [mailto:ho...@ho...] Sent: Thursday, December 07, 2000 4:58 PM To: dev...@li... Subject: RE: [Dev-C++] string-version of '+' Sorry, I need to clarify.. It's the MyString = MyStream.str(); line that the compiler bombs on. This other line with the parentheses is ok. ((MyString += "John has ") += "4") += " apples!"; Chad Simmons >From: "Chad Simmons" <ho...@ho...> >Reply-To: dev...@li... >To: dev...@li... >Subject: RE: [Dev-C++] string-version of '+' >Date: Thu, 07 Dec 2000 08:44:28 -0800 > >Interesting.. I decided to actually test the code I was promoting, and I >found a problem with the compiler.. It seems to bomb out on this bit of >code.. > >#include <string> >#include <iostream> >#include <strstream> >using namespace std; > >int main(int argc, char *argv[]) >{ > string MyString; > strstream MyStream; > > ((MyString += "John has ") += "4") += " apples!"; > > cout << MyString << endl; > > MyStream << "John has " << 10 << " apples!"; > > MyString = MyStream.str(); > > cout << MyString << endl; > > return 0; >} ____________________________________________________________________________ _________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
From: <exc...@sp...> - 2000-12-08 08:04:24
|
You got me there... :) It is not part of the ANSI spec. Another way to do it might be to use the sprintf function (www.cplusplus.com/ref/cstdio/sprintf.html) ----------------- From: "Ioannis Vranos" <no...@ya...> I don't think that there is any itoa() function in C standard library. _________________________________________s_p_r_a_y_ Här börjar Internet! Skaffa gratis e-mail och gratis Internet på http://www.spray.se |
From: Ioannis V. <no...@ya...> - 2000-12-08 01:14:10
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > Gregor Peter > Sent: Thursday, December 07, 2000 1:10 PM > To: dev...@li...; exc...@sp... > Subject: Re: [Dev-C++] RE: Int value to string > > Are there any online documentation about stdlib.h and Co where I > can look for myself? > (For a function to convert an array of char to sting, for example?) :-) char array[]="test"; string s=array; _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Chad S. <ho...@ho...> - 2000-12-07 16:57:52
|
Sorry, I need to clarify.. It's the MyString = MyStream.str(); line that the compiler bombs on. This other line with the parentheses is ok. ((MyString += "John has ") += "4") += " apples!"; Chad Simmons >From: "Chad Simmons" <ho...@ho...> >Reply-To: dev...@li... >To: dev...@li... >Subject: RE: [Dev-C++] string-version of '+' >Date: Thu, 07 Dec 2000 08:44:28 -0800 > >Interesting.. I decided to actually test the code I was promoting, and I >found a problem with the compiler.. It seems to bomb out on this bit of >code.. > >#include <string> >#include <iostream> >#include <strstream> >using namespace std; > >int main(int argc, char *argv[]) >{ > string MyString; > strstream MyStream; > > ((MyString += "John has ") += "4") += " apples!"; > > cout << MyString << endl; > > MyStream << "John has " << 10 << " apples!"; > > MyString = MyStream.str(); > > cout << MyString << endl; > > return 0; >} _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com |
From: Chad S. <ho...@ho...> - 2000-12-07 16:44:33
|
Interesting.. I decided to actually test the code I was promoting, and I found a problem with the compiler.. It seems to bomb out on this bit of code.. #include <string> #include <iostream> #include <strstream> using namespace std; int main(int argc, char *argv[]) { string MyString; strstream MyStream; ((MyString += "John has ") += "4") += " apples!"; cout << MyString << endl; MyStream << "John has " << 10 << " apples!"; MyString = MyStream.str(); cout << MyString << endl; return 0; } But I can compile the exact same code using the GNU G++ compiler without any errors or warnings or crashes. So this most likely explains Gregor's problems.. But the fault is with the compiler, as the Standard C++ library dictates this functionality. Chad Simmons _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com |
From: Chad S. <ho...@ho...> - 2000-12-07 16:32:22
|
Or you can do it with parentheses.. string myString; ((myString += "John has ") += myApples ) += " apples"; But this sort of thing should really be done with a strstream. Perhaps if Gregor could show more specifically what his code looks like I could explain how he's using the strstream wrong. Chad Simmons >From: James Gordon <Jam...@Cl...> >Reply-To: dev...@li... >To: "'dev...@li...'" ><dev...@li...> >Subject: RE: [Dev-C++] string-version of '+' >Date: Thu, 7 Dec 2000 15:34:59 -0000 > >this might not be the best way but I've always had to split the code into >two statements. > >Change this: >myString = "John has " + myApples + " apples"; > >To this: >myString = "John has " + myApples; >myString += " apples"; > [Snip] > >James. > > >-----Original Message----- >From: Gregor Peter [mailto:Gre...@dl...] >Sent: Thursday, December 07, 2000 2:58 PM >To: exc...@sp...; dev...@li... >Subject: [Dev-C++] string-version of '+' > > >You're right! > >I tried it before in a direkt manner which doesn't work :-( > >string myString; >char myApples[20]; >int myInt; > >itoa( myInt, myApples, 10); >myString = "John has " + myApples + " apples"; > >I get following error message: > invalid operands `const char[28]' and `char[20]' to binary `operator >+' _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com |
From: James G. <Jam...@Cl...> - 2000-12-07 16:09:47
|
this might not be the best way but I've always had to split the code into two statements. Change this: myString = "John has " + myApples + " apples"; To this: myString = "John has " + myApples; myString += " apples"; This is because it works from right to left. In your code you are trying to assign the string " apples" to the char[20] and the result from that to the string "John has " and then that lot to the std::string. I think that's correct... Regards, James. -----Original Message----- From: Gregor Peter [mailto:Gre...@dl...] Sent: Thursday, December 07, 2000 2:58 PM To: exc...@sp...; dev...@li... Subject: [Dev-C++] string-version of '+' You're right! I tried it before in a direkt manner which doesn't work :-( string myString; char myApples[20]; int myInt; itoa( myInt, myApples, 10); myString = "John has " + myApples + " apples"; I get following error message: invalid operands `const char[28]' and `char[20]' to binary `operator +' How do I enshure to use the string-version of '+' instead of the integer? Gregor > string my1String("John has"); > string my2String("apples!"); > char myApples[20] ; > int myInt = 6; > > itoa(myInt, myApples, 10); > > my1String = my1String + myApples + my2String ; > > That is you can put all of the strings into one, my1String. _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
From: Gregor P. <Gre...@dl...> - 2000-12-07 15:00:38
|
You're right! I tried it before in a direkt manner which doesn't work :-( string myString; char myApples[20]; int myInt; itoa( myInt, myApples, 10); myString = "John has " + myApples + " apples"; I get following error message: invalid operands `const char[28]' and `char[20]' to binary `operator +' How do I enshure to use the string-version of '+' instead of the integer? Gregor > string my1String("John has"); > string my2String("apples!"); > char myApples[20] ; > int myInt = 6; > > itoa(myInt, myApples, 10); > > my1String = my1String + myApples + my2String ; > > That is you can put all of the strings into one, my1String. |
From: James G. <Jam...@Cl...> - 2000-12-07 13:47:26
|
Do you mean a string as in std::string or a string as in char[] or char*? The function to do the latter is c_str(). Regards, James. -----Original Message----- From: Gregor Peter [mailto:Gre...@dl...] Sent: Thursday, December 07, 2000 1:27 PM To: dev...@li...; ho...@ho... Subject: Re: [Dev-C++] int to string OK I got the library and tried it out, but ist doesn't work. I need to feed needsStringFunc( string name ) so I tried string name = buffer.str() which causes my Programm to crash :-( So the str() method doesn't return the content of buffer as a string?!? Gregor Chad Simmons wrote: > How about this instead.. > > string my1String = "John"; > string my2String = "apples"; > int myInt = 6; > strstream buffer; > > buffer << my1String << " has " << myInt << " "<< my2String << "!" << endl; > > cout << buffer.str(); > > // Output = John has 6 apples! > > Chad Simmons > ____________________________________________________________________________ _________ > Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
From: Gregor P. <Gre...@dl...> - 2000-12-07 13:29:02
|
OK I got the library and tried it out, but ist doesn't work. I need to feed needsStringFunc( string name ) so I tried string name = buffer.str() which causes my Programm to crash :-( So the str() method doesn't return the content of buffer as a string?!? Gregor Chad Simmons wrote: > How about this instead.. > > string my1String = "John"; > string my2String = "apples"; > int myInt = 6; > strstream buffer; > > buffer << my1String << " has " << myInt << " "<< my2String << "!" << endl; > > cout << buffer.str(); > > // Output = John has 6 apples! > > Chad Simmons > _____________________________________________________________________________________ > Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
From: James G. <Jam...@Cl...> - 2000-12-07 12:01:36
|
strstream is part of the C++ IO Streams. I believe it's in strstream. It's in dev-C++\include\G++, all it does it include strstream.h. Regards, James. -----Original Message----- From: Gregor Peter [mailto:Gre...@dl...] Sent: Thursday, December 07, 2000 11:20 AM To: dev...@li...; ho...@ho... Subject: Re: [Dev-C++] int to string Fine, but where to get strstream from? It isn't in iostream.h am I right? Are there any online documentation about stdlib.h, string.h & Co where I can browse for myself? Gregor Chad Simmons wrote: > >How to convert, cast, transform, whatever a int value to a string? > >include <string.h> > >string my1String = "John has"; string my2String = "apples!"; int myInt = 6; > >my1stString = my1stString + UNKNOWN_FUNC(myInt) + my2ndString; > >As you guessed I'd like to get: "John has 6 apples!" > > How about this instead.. > > string my1String = "John"; > string my2String = "apples"; > int myInt = 6; > strstream buffer; > > buffer << my1String << " has " << myInt << " "<< my2String << "!" << endl; > cout << buffer.str(); > // Output = John has 6 apples! _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
From: James G. <Jam...@cl...> - 2000-12-07 11:57:24
|
It's in stdlib.h as 'char* itoa (int nValue, char* sz, int nRadix);' Regards, James. -----Original Message----- From: Ioannis Vranos [mailto:no...@ya...] Sent: Thursday, December 07, 2000 11:15 AM To: dev...@li... Subject: RE: [Dev-C++] RE: Int value to string I don't think that there is any itoa() function in C standard library. > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > exc...@sp... > Sent: Thursday, December 07, 2000 9:15 AM > To: dev...@li... > Subject: [Dev-C++] RE: Int value to string > > > >How to convert, cast, transform, whatever a >int value to a string? > First, include stdlib.h. > Then add another string to hold the myInt value: > > char myApples[20]; > > Then all you have to do is insert this line of code: > > itoa(myInt, myApples, 10); > > This line of code takes an int (myInt), and converts it to a > string (myAples), with base 10. If you want the number in hex, > write 16. If you want it in binary, write 2. > > /Orjan > > > _________________________________________s_p_r_a_y_ > Här börjar Internet! > Skaffa gratis e-mail och gratis Internet på http://www.spray.se > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
From: Gregor P. <Gre...@dl...> - 2000-12-07 11:22:09
|
Fine, but where to get strstream from? It isn't in iostream.h am I right? Are there any online documentation about stdlib.h, string.h & Co where I can browse for myself? Gregor Chad Simmons wrote: > >How to convert, cast, transform, whatever a int value to a string? > >include <string.h> > >string my1String = "John has"; string my2String = "apples!"; int myInt = 6; > >my1stString = my1stString + UNKNOWN_FUNC(myInt) + my2ndString; > >As you guessed I'd like to get: "John has 6 apples!" > > How about this instead.. > > string my1String = "John"; > string my2String = "apples"; > int myInt = 6; > strstream buffer; > > buffer << my1String << " has " << myInt << " "<< my2String << "!" << endl; > cout << buffer.str(); > // Output = John has 6 apples! |
From: Ioannis V. <no...@ya...> - 2000-12-07 11:14:51
|
I don't think that there is any itoa() function in C standard library. > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > exc...@sp... > Sent: Thursday, December 07, 2000 9:15 AM > To: dev...@li... > Subject: [Dev-C++] RE: Int value to string > > > >How to convert, cast, transform, whatever a >int value to a string? > First, include stdlib.h. > Then add another string to hold the myInt value: > > char myApples[20]; > > Then all you have to do is insert this line of code: > > itoa(myInt, myApples, 10); > > This line of code takes an int (myInt), and converts it to a > string (myAples), with base 10. If you want the number in hex, > write 16. If you want it in binary, write 2. > > /Orjan > > > _________________________________________s_p_r_a_y_ > Här börjar Internet! > Skaffa gratis e-mail och gratis Internet på http://www.spray.se > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com |
From: Ioannis V. <no...@ya...> - 2000-12-07 11:12:54
|
My guess is that you are not using the address to operator &. E.g.. int number; scanf("%d", &number); > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > jw...@cs... > Sent: Thursday, December 07, 2000 5:40 AM > To: dev...@li... > Subject: [Dev-C++] Big problems with version 4.01.... > > > > I'm a beginning programmer and use Dev-C++ for my C > programming. Anyway, ever since installing version 4.01 I've > noticed some very odd things that i didn't notice in 4.0. For > example, whenever i try to use the fscanf function to read a floating > point number into a file, the program compiles okay but crashes on > both of my computers (Win2000 and Win98). Is it just me or does > 4.01 have some serious bugs in it? Another thing that is really > strange is when a try to use to scanf function to scan a single > character into a data structure. The program simply crashes. I just > wanted to know what was going on. > > Thanx. > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Gregor P. <Gre...@dl...> - 2000-12-07 11:11:58
|
Looks pretty good but what I need is a string not char[10] to feed needsStringFunc( string name) Are there any online documentation about stdlib.h and Co where I can look for myself? (For a function to convert an array of char to sting, for example?) :-) Gregor exc...@sp... wrote: > >How to convert, cast, transform, whatever a int value to a string? > First, include stdlib.h. > Then add another string to hold the myInt value: > char myApples[20]; > Then all you have to do is insert this line of code: > itoa(myInt, myApples, 10); > This line of code takes an int (myInt), and converts it to a string (myAples), with base 10. If you want the number in hex, write 16. If you want it in binary, write 2. |
From: <exc...@sp...> - 2000-12-07 08:18:15
|
>How to convert, cast, transform, whatever a >int value to a string? First, include stdlib.h. Then add another string to hold the myInt value: char myApples[20]; Then all you have to do is insert this line of code: itoa(myInt, myApples, 10); This line of code takes an int (myInt), and converts it to a string (myAples), with base 10. If you want the number in hex, write 16. If you want it in binary, write 2. /Orjan _________________________________________s_p_r_a_y_ Här börjar Internet! Skaffa gratis e-mail och gratis Internet på http://www.spray.se |
From: <jw...@cs...> - 2000-12-07 03:41:58
|
I'm a beginning programmer and use Dev-C++ for my C programming. Anyway, ever since installing version 4.01 I've noticed some very odd things that i didn't notice in 4.0. For example, whenever i try to use the fscanf function to read a floating point number into a file, the program compiles okay but crashes on both of my computers (Win2000 and Win98). Is it just me or does 4.01 have some serious bugs in it? Another thing that is really strange is when a try to use to scanf function to scan a single character into a data structure. The program simply crashes. I just wanted to know what was going on. Thanx. |