dev-cpp-users Mailing List for Dev-C++
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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
(2) |
2
(3) |
3
(2) |
4
(13) |
5
(2) |
6
(9) |
7
(15) |
8
(4) |
9
(7) |
10
(9) |
11
(9) |
12
(19) |
13
(5) |
14
(11) |
15
(7) |
16
(5) |
17
(5) |
18
(4) |
19
(5) |
20
(13) |
21
(11) |
22
(6) |
23
(2) |
24
(1) |
25
(10) |
26
(7) |
27
(14) |
28
(6) |
29
(23) |
30
(13) |
31
(16) |
|
|
|
|
|
|
From: Elias P. <Eli...@ao...> - 2000-12-31 20:37:30
|
Hi- I am investigating a library. It installs ok, and I have sorted out = the header issues, but they only provide a .lib file and a .dll file. I = know there is a .lib-to-.a converter out there, but I am unable to find = it. However, is it possible to link my program with the dll at linking = time? The only errors I get with my program are undefined symbols during = linking. --Quentin No, linking time is when the .a file would be needed. What you could try = is loading the dll at run time. All i know about this is the description = of the functions LoadLibrary and GetProcAddress. For example you could = use them like this to call a function inside your dll: with this declaration in mydll.h: extern int myfunction(char *); you could try: ... somewhere at the bginning of the program: HMODULE mydll; // handle to the dll int (*mydll_myfunction)(char *); // pointer to the dll function=20 mydll =3D LoadLibrary("MYDLL.DLL"); mydll_myfunction =3D (void *) GetProcAddress(my8dll,"myfunction"); ... here you can use the dll function mydll_myfunction ... at the end of the program: FreeLibrary(mydll); |
From: Ioannis V. <no...@ya...> - 2000-12-31 20:02:37
|
Perhaps it is due to implementation (GCC) mistake. Have you tried it with a different compiler? Btw because i have erased your original message can you please resend me the code if it does not bother you, at no...@ya... (so as to not resend it to the list again). Ioannis -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Alan Thomas Sent: Sunday, December 31, 2000 7:04 PM To: dev...@li... Subject: RE: [Dev-C++] first time error return on checking file stream validity No, the point was to create an invalid file stream, so I can test my functions to ensure they react correctly to this error. The problem is that on the first call to the function, it does not return an error. On the second and subsequent calls, it does return an error. How does anyone else out there test these sorts of things? Thanks, Alan |
From: Elias P. <Eli...@ao...> - 2000-12-31 19:47:32
|
> hi, > > when i am trying to install the allegro library, for the compiler mingw32 i > come accross an error that i am unsure about the cause of. I'm at the stage > where i have completed most of the tasks in the mingw32 help document. At > the point where i am in MSDos mode and type 'make' i am given the following > error message:- > > c:\mingw32\bin\make.exe:***no rule to make target 'src/win/gdi.c', needed by > obj/mingw32/alld_s/gdi.o'. STOP > > does anyone with experience of the allegro setup and mingw32 setup have any > idea of the cause and rectification of the error? > I have no idea, but the directory 'alld_s' in the error path sounds like you were using STATICLINK or DEBUGMODE, both of which you normally shouldn't. Try to go to www.allegro.cc, and ask in the forum, the people there will know the problem. |
From: Quentin S. <mac...@bi...> - 2000-12-31 18:53:53
|
Hi- I am investigating a library. It installs ok, and I have sorted out the = header issues, but they only provide a .lib file and a .dll file. I know = there is a .lib-to-.a converter out there, but I am unable to find it. = However, is it possible to link my program with the dll at linking time? = The only errors I get with my program are undefined symbols during = linking. --Quentin |
From: jag <won...@th...> - 2000-12-31 18:42:31
|
hi, when i am trying to install the allegro library, for the compiler mingw32 i come accross an error that i am unsure about the cause of. I'm at the stage where i have completed most of the tasks in the mingw32 help document. At the point where i am in MSDos mode and type 'make' i am given the following error message:- c:\mingw32\bin\make.exe:***no rule to make target 'src/win/gdi.c', needed by obj/mingw32/alld_s/gdi.o'. STOP does anyone with experience of the allegro setup and mingw32 setup have any idea of the cause and rectification of the error? thankyou in advance, jag |
From: Alan T. <ala...@3n...> - 2000-12-31 17:08:29
|
Sorry --- I was sending in HTML vice plain text format. ----- Original Message ----- From: Alan Thomas To: dev...@li... Sent: Sunday, December 31, 2000 12:03 PM Subject: RE: [Dev-C++] first time error return on checking file stream validity No, the point was to create an invalid file stream, so I can test my functions to ensure they react correctly to this error. The problem is that on the first call to the function, it does not return an error. On the second and subsequent calls, it does return an error. How does anyone else out there test these sorts of things? Thanks, Alan From: "Ioannis Vranos" <no...@ya...> To: <dev...@li...> Subject: RE: [Dev-C++] first time error return on checking file stream validity Date: Sun, 31 Dec 2000 17:21:13 +0200 Reply-To: dev...@li... This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C0734E.13A04DD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I have the impression you do not create or open any file, e.g. std::ofstream invalid("test.txt"); I do not know much about C++ file operations yet but i think this is the problem. Ioannis -----Original Message----- ofstream invalid; // used to test for error opening file |
From: Alan T. <ala...@3n...> - 2000-12-31 17:06:10
|
No, the point was to create an invalid file stream, so I can test my = functions to ensure they react correctly to this error. The problem is = that on the first call to the function, it does not return an error. On = the second and subsequent calls, it does return an error. =20 How does anyone else out there test these sorts of things? = Thanks, Alan From: "Ioannis Vranos" <no...@ya...> To: <dev...@li...> Subject: RE: [Dev-C++] first time error return on checking file stream = validity Date: Sun, 31 Dec 2000 17:21:13 +0200 Reply-To: dev...@li... This is a multi-part message in MIME format. ------=3D_NextPart_000_0000_01C0734E.13A04DD0 Content-Type: text/plain; charset=3D"iso-8859-1" Content-Transfer-Encoding: 7bit I have the impression you do not create or open any file, e.g. = std::ofstream invalid("test.txt"); I do not know much about C++ file operations yet but i think this is the problem. Ioannis -----Original Message----- ofstream invalid; // used to test for error opening file |
From: Ioannis V. <no...@ya...> - 2000-12-31 15:19:40
|
I have the impression you do not create or open any file, e.g. std::ofstream invalid("test.txt"); I do not know much about C++ file operations yet but i think this is the problem. Ioannis -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Alan Thomas Sent: Sunday, December 31, 2000 1:19 AM To: dev...@li... Subject: [Dev-C++] first time error return on checking file stream validity The code below gives some interesting results. First return from the function start_HTML_file is 0 (no error), while the second time it returns 1 (could not open file). What does this mean? Thanks, Alan #include <iostream.h> #include <stdlib.h> #include <fstream.h> #include <string.h> // define HTML author const char *Author = "Alan Thomas"; // // function prototype // int start_HTML_file (ofstream&output_file, char *keywords = NULL, char *title = NULL); int main() { ofstream invalid; // used to test for error opening file // Test invalid file checking cout << "Error return was " << start_HTML_file (invalid, NULL, "This is the title") << endl; cout << "Error return was " << start_HTML_file (invalid, NULL, "This is the title") << endl; system("PAUSE"); return 0; } int start_HTML_file (ofstream&output_file, char *keywords = NULL, char *title = NULL) { if (!output_file) { cout << "Error opening file." << endl; return 1; // error indication } // Write header information output_file << "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">"; output_file << endl; output_file << "<html>" << endl; output_file << "<head>" << endl; output_file << "<meta http-equiv=\"Content-Type\" content-\"text/html; charset=iso-8859-1\""; output_file << endl; output_file << "<meta name=\"Author\" content=\"" << Author << "\">" << endl; if (keywords != NULL) { output_file << "<meta name=\"KeyWords\" content=\""; output_file << keywords << ">\"" << endl; } // Write out title if (title != NULL) { output_file << "<title>"; output_file << title; output_file << "</title>" << endl; } // End header output_file << "</head>" << endl; return 0; } |
From: Ioannis V. <no...@ya...> - 2000-12-31 15:14:13
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of lavi > Sent: Sunday, December 31, 2000 3:16 PM > To: dev...@li... > Subject: Re: [Dev-C++] STLPort > > > > I defined a member function ; > class Cat > {int Age; > public: > void s (int x); > } }; > void Cat::s (int z) {Age=z;} > // but the compiler is complaining''25 c:\dev-c_~1\untitl~1.cpp > declaration of `void Cat::S(int)' outside of class is not definition > > Thanks > Joe Lavi > > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: lavi <jl...@ne...> - 2000-12-31 14:27:42
|
I defined a member function ; class Cat {int Age; public: void s (int x); } void Cat::s (int z) {Age=z;} // but the compiler is complaining''25 c:\dev-c_~1\untitl~1.cpp declaration of `void Cat::S(int)' outside of class is not definition Thanks Joe Lavi |
From: Arjen W. <ar...@wi...> - 2000-12-31 04:22:21
|
Hello all, Has anyone used the STLPort package (www.stlport.com) successfully with Dev-C++? Regards, Arjen |
From: Elias P. <Eli...@ao...> - 2000-12-31 03:09:59
|
> hi elias, > > with reference to allegro and devc++, did you download the The MingW32 > compiler, documentation and utilities or is this not needed if you are using > devc++? > thanks > jag It worked with dev-c++ when i tried it some time ago, but i just tried it now and it doesn't work. So the only way to compile it is to download the gcc-2.95.2-msvcrt.exe. You don't need the mingw32-docs-html.exe however. |
From: jag <won...@th...> - 2000-12-31 02:59:00
|
hi elias, with reference to allegro and devc++, did you download the The MingW32 compiler, documentation and utilities or is this not needed if you are using devc++? thanks jag ----- Original Message ----- From: "Elias Pschernig" <Eli...@ao...> To: <dev...@li...> Sent: Sunday, December 31, 2000 2:09 AM Subject: Re: [Dev-C++] setting up allegro > > hi, > > > > i've downloaded allegro. There are instructions and read.me files > with it > > but i am confused as to how it should be set up to work with devc++. > is > > anyone familiar with allegro and has maybe set their version up with > dev > > c++? > > Yes - you can use the mingw version of allegro. But it only comes as > sourcecode. So to use the library, you first have to compile it. There > should be a file readme.mgw in your allegro directory, it tells you all > the software you need to download, and what you have to do (you have to > read carefully because it won't work if you forget anything). > > After everything has been compiled and installed, you can set up dev-c++ > to use allegro. To do so, i had to copy the following files: > from c:\mingw\include\allegro\*.* to c:\dev-c++\include > from c:\mingw\include\allegro.h to c:\dev-c++\include > from c:\mingw\lib\liballeg.a to c:\dev-c++\lib > > To use allegro in your dev-c++ project, you have to write -lalleg to > 'further object files or linker options' in the project options. You > should now be able to just copy any of the example source-codes and > compile and run them from dev-c++. > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: Elias P. <Eli...@ao...> - 2000-12-31 02:09:56
|
> hi, > > i've downloaded allegro. There are instructions and read.me files with it > but i am confused as to how it should be set up to work with devc++. is > anyone familiar with allegro and has maybe set their version up with dev > c++? Yes - you can use the mingw version of allegro. But it only comes as sourcecode. So to use the library, you first have to compile it. There should be a file readme.mgw in your allegro directory, it tells you all the software you need to download, and what you have to do (you have to read carefully because it won't work if you forget anything). After everything has been compiled and installed, you can set up dev-c++ to use allegro. To do so, i had to copy the following files: from c:\mingw\include\allegro\*.* to c:\dev-c++\include from c:\mingw\include\allegro.h to c:\dev-c++\include from c:\mingw\lib\liballeg.a to c:\dev-c++\lib To use allegro in your dev-c++ project, you have to write -lalleg to 'further object files or linker options' in the project options. You should now be able to just copy any of the example source-codes and compile and run them from dev-c++. |
From: Ioannis V. <no...@ya...> - 2000-12-31 00:26:32
|
int f(void); //function that accepts no parameters and returns an int int f(int x); // function that accepts an int and returns an int void f(int x); //function that accepts an int and does not return any value Ioannis > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of jag > Sent: Sunday, December 31, 2000 1:06 AM > To: devc++ mail-list > Subject: [Dev-C++] sending and retrieving values from functions > > > hi, > > i'm studying a tutorial that makes use of a function named my_number. > > at the beggining of the code before the main loop it is declared as > follows:- > > void my_number(void); > > the code for the routine is called from within the main loop by > the command > my_number(); > > my question is, if i wanted a return value for one of the values in the > function my_number what command would i use? > > The tutorial explains the use of the term void in the code saying > that it is > used when there is no return values! > > Is it possible for anyone to explain how i might send or retrieve > values to > the function my_number? > > thanks, > jag > > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: jag <won...@th...> - 2000-12-31 00:26:14
|
hi, i've downloaded allegro. There are instructions and read.me files with it but i am confused as to how it should be set up to work with devc++. is anyone familiar with allegro and has maybe set their version up with dev c++? thanks, jag |
From: Alan T. <ala...@3n...> - 2000-12-30 23:21:46
|
The code below gives some interesting results. First return from the function start_HTML_file is 0 (no error), while the second time it = returns 1 (could not open file). What does this mean? Thanks, Alan #include <iostream.h> #include <stdlib.h> #include <fstream.h> #include <string.h> // define HTML author const char *Author =3D "Alan Thomas"; // // function prototype // int start_HTML_file (ofstream&output_file, char *keywords =3D NULL, char *title =3D NULL); int main() { ofstream invalid; // used to test for error opening file // Test invalid file checking cout << "Error return was " << start_HTML_file (invalid, NULL, "This is the title") << endl; cout << "Error return was " << start_HTML_file (invalid, NULL, "This is the title") << endl; system("PAUSE"); return 0; } int start_HTML_file (ofstream&output_file, char *keywords =3D NULL, char *title =3D NULL) { if (!output_file) { cout << "Error opening file." << endl; return 1; // error indication } // Write header information output_file << "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">"; output_file << endl; output_file << "<html>" << endl; output_file << "<head>" << endl; output_file << "<meta http-equiv=3D\"Content-Type\" = content-\"text/html; charset=3Diso-8859-1\""; output_file << endl; output_file << "<meta name=3D\"Author\" content=3D\"" << Author << = "\">" << endl; if (keywords !=3D NULL) { output_file << "<meta name=3D\"KeyWords\" content=3D\""; output_file << keywords << ">\"" << endl; } // Write out title if (title !=3D NULL) { output_file << "<title>"; output_file << title; output_file << "</title>" << endl; } // End header output_file << "</head>" << endl; return 0; } |
From: jag <won...@th...> - 2000-12-30 23:00:15
|
hi, i'm studying a tutorial that makes use of a function named my_number. at the beggining of the code before the main loop it is declared as follows:- void my_number(void); the code for the routine is called from within the main loop by the command my_number(); my question is, if i wanted a return value for one of the values in the function my_number what command would i use? The tutorial explains the use of the term void in the code saying that it is used when there is no return values! Is it possible for anyone to explain how i might send or retrieve values to the function my_number? thanks, jag |
From: Ioannis V. <no...@ya...> - 2000-12-30 13:22:30
|
I agree with you, it would be nice. It also would be nice if it was written in C/C++ so we all C/C++ programmers could contribute our code to it. :) Ioannis -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Luc Morin Sent: Saturday, December 30, 2000 2:41 PM To: dev...@li... Subject: Re: [Dev-C++] Using Dev-C++ with Borland's free compiler Hi, ok, so you edit the code with Dev-C++ and compile manually ? It would be nice to be able to customize the IDE to use any compiler :) Regards, |
From: Luc M. <lu...@ho...> - 2000-12-30 12:39:50
|
Hi, ok, so you edit the code with Dev-C++ and compile manually ? It would be nice to be able to customize the IDE to use any compiler :) Regards, ----- Original Message ----- From: Ioannis Vranos Sent: 30 d=E9cembre, 2000 02:15 To: dev...@li... Subject: RE: [Dev-C++] Using Dev-C++ with Borland's free compiler I am using Borland C++ 5.5 myself, in this way: I have placed borland's c= ompiler directory in my path environment and i run bcc32 in a command pro= mpt window. Ioannis -----Original Message----- From: dev...@li... [mailto:dev-cpp-users-adm= in...@li...]On Behalf Of Luc Morin Sent: Friday, December 29, 2000 3:22 AM To: Dev...@li... Subject: [Dev-C++] Using Dev-C++ with Borland's free compiler Hi, as subject states, I'd like to use Dev-C++ with Borland's compiler. Has anyone tried that ? If it's possible, could someone post an HOWTO ? Thanks Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.= <br clear=3Dall><hr>Get Your Private, Free E-mail from MSN Hotmail at <a = href=3D"http://www.hotmail.com">http://www.hotmail.com</a>.<br></p> |
From: Ioannis V. <no...@ya...> - 2000-12-30 12:15:16
|
Talking about C, has anybody in here realized what crap has been introduced in C, in C99 standard? The language has been totally ruined. Now i completely understand why K&R will not write a new book. Ioannis * Ioannis Vranos * Programming pages: http://members.nbci.com/noicys * Alternative URL: http://run.to/noicys |
From: Ioannis V. <no...@ya...> - 2000-12-30 12:14:48
|
I forgot to mention http://www.accu.org , the C/C++ Users Group which has reviews of books. I have discovered this site from Stroustrup's site. Why listen to marketing when you can see reviews from C/C++ professionals? Just visit the site and look at the book reviews. Ioannis * Ioannis Vranos * Programming pages: http://members.nbci.com/noicys * Alternative URL: http://run.to/noicys |
From: Ioannis V. <no...@ya...> - 2000-12-30 12:13:51
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > Ramana Kumar > Sent: Saturday, December 30, 2000 10:56 AM > To: dev...@li... > Subject: RE: [Dev-C++] [OT] C++ string vs char * > > > I'm not too good with strings, but based on your e-mail, I would go for > creating a simple string class. > > C++ strings become a pain depending on the things you do because > they aren't > compatible with char[]s and vice versa (I'm writing a game that takes in a > string containing a command in English and acts accordingly, i.e. "Open > door" opens the door). I did not understand what exactly you mean by saying they are not compatible with each other, but you can work with both with C-style strings and C++ strings either by convering the C-style to C++ style or by using the C++ style string functions so as to use them as C-style (although i recommend the first conversion from C-style to C++ style). e.g. the string function c_str() enables you to use C++ strings with functions accepting C-style sttrings (example taken by Bjarne Stroustrup's "The C++ Programming Language" - Special Edition page 49): [...] string name="Niels Stroustrup"; void f() { printf("name: %s\n", name.c_str()); } Ioannis |
From: Ramana K. <ra...@my...> - 2000-12-30 08:53:24
|
I'm not too good with strings, but based on your e-mail, I would go for creating a simple string class. C++ strings become a pain depending on the things you do because they aren't compatible with char[]s and vice versa (I'm writing a game that takes in a string containing a command in English and acts accordingly, i.e. "Open door" opens the door). Using char*'s/char[]s gives you good control. I don't know what you mean by bloat/efficiency, but basically, from what I understand, I think the char*s will give more "efficiency?". The only problem with the char*s is, as you said you have to do your memory management but also some useful functions in string.h (I think) don't work on them. If some of what I'm saying is complete poppycock, I do apologise, I am going by experience, not by facts from the ISO C++ "set of rules". So as I said, I would take option b. Ramana -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of bis...@bt... Sent: Friday, December 29, 2000 9:05 PM To: dev...@li... Subject: [Dev-C++] [OT] C++ string vs char * Hi all I'm writing a small application using G++ - this one has a lot of string manipulation (It is a doxygen-like auto documentation system for a propreitory language). I seem to have three options: a) Use char *s and do my own memory management. b) Roll by own lightweight string class c) Use the C++ string class Can anyone tell me how good is the string class in terms of bloat/efficiency compared to char * ? Is (b) a viable option if what I want is basically char * with inbuild memory management ? Also, should I use (io|f|str)string ? How much of a bloat/efficiency concern is that compared to (f|s)printf/write/read and friends ? I don't plan to use the STL stuff. Thanks in advance. Biswa. _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
From: Ramana K. <ra...@my...> - 2000-12-30 08:44:02
|
Hi, Firstly, I suggest you get version 4.01 (the latest) unless that is what you meant :). Yes, all the include files end in a .h (or sometimes a .hpp - but rarely) and they should all be found (under default installation) in C:\Dev-C++\Include\. If you have another .h file you want to use, either copy to this folder or, go to Options->Compiler Options and there, in the Include file path thing, put the path of your other file as well (separate the two by ';'s I think) Ramana -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of jag Sent: Friday, December 29, 2000 12:29 PM To: devc++ mail-list Subject: [Dev-C++] include files those with a .h? ok i've got my dev cpp ver 4.0 ready to boogy with! cos i'm a novice at the moment bear with me..simple questions first. all the include files for a program end with .h correct? so when you compile a program and it has errors saying it can not find the .h files you have them stored on the hard drive in the wrong place! So saying that do all the include files have to be in the dev cpp include directory? or is there a simpler easier way to go about it? _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |