dev-cpp-users Mailing List for Dev-C++ (Page 306)
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: Matthews <dem...@uw...> - 2003-10-12 15:24:03
|
Guard statements are lines like these in your header files: #ifndef FOOHEADER_H #define FOOHEADER_H int foo; char *foostring; //... #endif Then if two files include foo.h, it won't be recompiled because FOOHEADER_H has already been defined. At 04:12 PM 11/10/2003 -0700, David McKen wrote: >Explain. > >----- Original Message ----- >From: <age...@co...> >To: <ci...@ya...> >Sent: Saturday, October 11, 2003 12:12 PM >Subject: Re: [Dev-C++] Where to include files > > >> Guard statements can prevent this. >> >> -- >> ~~Scott Simontis~~ >> Programmer >> > As far as I know there are no "rules". However here is my rule >> > "Include in >> > the .cpp, if it gives you errors put it in the .h". >> > >> > The main reason you don't want to put it in the .h is because the >> > header >> > will be included in EVERY single file that includes your header >and >> > (this is >> > the killer) is recompiled every time one of those files is >> > re-compiled. If >> > the header is in the .cpp then it is only re-compiled when the >.cpp >> > changes. >> > >> > Of course if you have some super computer avalible then this >reason >> > goes out >> > the window. If you don't then this is about the only reason I can >> > think of. >> > >> > Signed >> > David McKen >> > >> > >> > ----- Original Message ----- >> > From: "Glen Vermeylen" <gve...@pa...> >> > To: <dev...@li...> >> > Sent: Saturday, October 11, 2003 10:32 AM >> > Subject: [Dev-C++] Where to include files >> > >> > >> > > Hi, I was wondering where I should best place my include files. >> > > Suppose I have a class testClass which needs to include a >couple of >> > files. >> > > Should I place the include-statements in the .cpp files or in >the >> > .h (so >> > > one could see which files are needed?)? >> > > Or does it depend on the circomstances? For example: >include-files >> > which >> > > contain the type of declared members in the header, and >> > include-files >> > > needed for the implementation in the .cpp file? >> > > Are there rules, or am I free to choose? >> > > >> > > Please enlighten me :-) . >> > > >> > > >> > > >> > > ------------------------------------------------------- >> > > This SF.net email is sponsored by: SF.net Giveback Program. >> > > SourceForge.net hosts over 70,000 Open Source Projects. >> > > See the people who have HELPED US provide better services: >> > > Click here: http://sourceforge.net/supporters.php >> > > _______________________________________________ >> > > 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 >> > >> > >> > __________________________________ >> > Do you Yahoo!? >> > The New Yahoo! Shopping - with improved product search >> > http://shopping.yahoo.com >> > >> > >> > ------------------------------------------------------- >> > This SF.net email is sponsored by: SF.net Giveback Program. >> > SourceForge.net hosts over 70,000 Open Source Projects. >> > See the people who have HELPED US provide better services: >> > Click here: http://sourceforge.net/supporters.php >> > _______________________________________________ >> > 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 > >__________________________________ >Do you Yahoo!? >The New Yahoo! Shopping - with improved product search >http://shopping.yahoo.com > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >SourceForge.net hosts over 70,000 Open Source Projects. >See the people who have HELPED US provide better services: >Click here: http://sourceforge.net/supporters.php >_______________________________________________ >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 > |
|
From: David M. <ci...@ya...> - 2003-10-12 14:13:30
|
Ahh, I see where you are coming from. What those statements won't quard against is compiling files that simply aren't required. e.g. If your class uses math.h you would only include it in the .cpp file. This prevents any .cpp files that include your header from having to compile in math.h (unless they include it themselves). I don't believe the question posed is how to prevent multiple inclusion, if I mis-interpreted then your answer would work perfectly. Signed David McKen --- age...@co... wrote: > Whereever you may be putting your include files, try something like > this: > #ifndef __HEADERNAME_H__ > #define __HEADERNAME_H__ > #endif > > Or, you can use #pragma statements. I am not sure about #pragmas, > as they depend on compilers. Check the MinGW docs. > > -- > ~~Scott Simontis~~ > Programmer > > Explain. > > > > ----- Original Message ----- > > From: <age...@co...> > > To: <ci...@ya...> > > Sent: Saturday, October 11, 2003 12:12 PM > > Subject: Re: [Dev-C++] Where to include files > > > > > > > Guard statements can prevent this. > > > > > > -- > > > ~~Scott Simontis~~ > > > Programmer > > > > As far as I know there are no "rules". However here is my > rule > > > > "Include in > > > > the .cpp, if it gives you errors put it in the .h". > > > > > > > > The main reason you don't want to put it in the .h is because > the > > > > header > > > > will be included in EVERY single file that includes your > header > > and > > > > (this is > > > > the killer) is recompiled every time one of those files is > > > > re-compiled. If > > > > the header is in the .cpp then it is only re-compiled when > the > > .cpp > > > > changes. > > > > > > > > Of course if you have some super computer avalible then this > > reason > > > > goes out > > > > the window. If you don't then this is about the only reason I > can > > > > think of. > > > > > > > > Signed > > > > David McKen > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Glen Vermeylen" <gve...@pa...> > > > > To: <dev...@li...> > > > > Sent: Saturday, October 11, 2003 10:32 AM > > > > Subject: [Dev-C++] Where to include files > > > > > > > > > > > > > Hi, I was wondering where I should best place my include > files. > > > > > Suppose I have a class testClass which needs to include a > > couple of > > > > files. > > > > > Should I place the include-statements in the .cpp files or > in > > the > > > > .h (so > > > > > one could see which files are needed?)? > > > > > Or does it depend on the circomstances? For example: > > include-files > > > > which > > > > > contain the type of declared members in the header, and > > > > include-files > > > > > needed for the implementation in the .cpp file? > > > > > Are there rules, or am I free to choose? > > > > > > > > > > Please enlighten me :-) . > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > This SF.net email is sponsored by: SF.net Giveback Program. > > > > > SourceForge.net hosts over 70,000 Open Source Projects. > > > > > See the people who have HELPED US provide better services: > > > > > Click here: http://sourceforge.net/supporters.php > > > > > _______________________________________________ > > > > > 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 > > > > > > > > > > > > __________________________________ > > > > Do you Yahoo!? > > > > The New Yahoo! Shopping - with improved product search > > > > http://shopping.yahoo.com > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: SF.net Giveback Program. > > > > SourceForge.net hosts over 70,000 Open Source Projects. > > > > See the people who have HELPED US provide better services: > > > > Click here: http://sourceforge.net/supporters.php > > > > _______________________________________________ > > > > 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 > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. > > SourceForge.net hosts over 70,000 Open Source Projects. > > See the people who have HELPED US provide better services: > > Click here: http://sourceforge.net/supporters.php > > _______________________________________________ > > 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 ===== Signed David Mcken Life Sucks Live with it __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
|
From: David M. <ci...@ya...> - 2003-10-11 23:12:52
|
Explain. ----- Original Message ----- From: <age...@co...> To: <ci...@ya...> Sent: Saturday, October 11, 2003 12:12 PM Subject: Re: [Dev-C++] Where to include files > Guard statements can prevent this. > > -- > ~~Scott Simontis~~ > Programmer > > As far as I know there are no "rules". However here is my rule > > "Include in > > the .cpp, if it gives you errors put it in the .h". > > > > The main reason you don't want to put it in the .h is because the > > header > > will be included in EVERY single file that includes your header and > > (this is > > the killer) is recompiled every time one of those files is > > re-compiled. If > > the header is in the .cpp then it is only re-compiled when the .cpp > > changes. > > > > Of course if you have some super computer avalible then this reason > > goes out > > the window. If you don't then this is about the only reason I can > > think of. > > > > Signed > > David McKen > > > > > > ----- Original Message ----- > > From: "Glen Vermeylen" <gve...@pa...> > > To: <dev...@li...> > > Sent: Saturday, October 11, 2003 10:32 AM > > Subject: [Dev-C++] Where to include files > > > > > > > Hi, I was wondering where I should best place my include files. > > > Suppose I have a class testClass which needs to include a couple of > > files. > > > Should I place the include-statements in the .cpp files or in the > > .h (so > > > one could see which files are needed?)? > > > Or does it depend on the circomstances? For example: include-files > > which > > > contain the type of declared members in the header, and > > include-files > > > needed for the implementation in the .cpp file? > > > Are there rules, or am I free to choose? > > > > > > Please enlighten me :-) . > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: SF.net Giveback Program. > > > SourceForge.net hosts over 70,000 Open Source Projects. > > > See the people who have HELPED US provide better services: > > > Click here: http://sourceforge.net/supporters.php > > > _______________________________________________ > > > 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 > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. > > SourceForge.net hosts over 70,000 Open Source Projects. > > See the people who have HELPED US provide better services: > > Click here: http://sourceforge.net/supporters.php > > _______________________________________________ > > 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 __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
|
From: David M. <ci...@ya...> - 2003-10-11 15:56:23
|
As far as I know there are no "rules". However here is my rule "Include in the .cpp, if it gives you errors put it in the .h". The main reason you don't want to put it in the .h is because the header will be included in EVERY single file that includes your header and (this is the killer) is recompiled every time one of those files is re-compiled. If the header is in the .cpp then it is only re-compiled when the .cpp changes. Of course if you have some super computer avalible then this reason goes out the window. If you don't then this is about the only reason I can think of. Signed David McKen ----- Original Message ----- From: "Glen Vermeylen" <gve...@pa...> To: <dev...@li...> Sent: Saturday, October 11, 2003 10:32 AM Subject: [Dev-C++] Where to include files > Hi, I was wondering where I should best place my include files. > Suppose I have a class testClass which needs to include a couple of files. > Should I place the include-statements in the .cpp files or in the .h (so > one could see which files are needed?)? > Or does it depend on the circomstances? For example: include-files which > contain the type of declared members in the header, and include-files > needed for the implementation in the .cpp file? > Are there rules, or am I free to choose? > > Please enlighten me :-) . > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > 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 __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
|
From: Daniel G. <sp...@ho...> - 2003-10-11 15:01:39
|
I found DEV to be excellent for learning C++, but if you then move to visual studio and microsoft's version of C++ (I am exaggerating) then it can be a little confusing with templates. But do not worry, you will not go wrong. And post your questions to the mailing list - I need to get better at C++ also!!! (too much cross-language work!). >From: "Hossein Haeri" <ult...@em...> >To: dev...@li... >Subject: Re: [Dev-C++] Want some help for a c++ beginner. >Date: Sat, 11 Oct 2003 03:31:09 -0500 > >Dear lavaspan, > > >I am a beginner, but I am learning. >Good Luck! > > > 1.Is Bjarne Stroustrup's The C++ Programming Language suited > > for a beginner? > >Yep! But not as the first text. In my idea, the best book as a >first text is: "Accelerated C++", just take a look at: >http://www.acceleratedcpp.com > >Anyway, after reading the first text, I recommend TC++PL, and a >look to the two other famous "general purpose" C++ books, i.e., >"The C++ Primer," and "C++: How to Programme". (Look for the >latest versions.) > > > 2.Which c++ complier is recommended for learning pure c++? > >There are not so much options, but GCC, Comeau C++, and Intel C++ >are the most Standard compliant ones. (Don't forget that there is >no fully Standard compliant compiler.) > > > 3.I don't want to use some popular comercial c++ development > > tools such as Microsoft's Visual C++ or Borland' C++ Builder. > > Is learning basic c++ concepts a good idea, or how about > > straightly learning those popular tools? > >Hmmm... It completely depends on your purposes; If you want to do >things which I call "Developery stuff," you've got to bypass deep >issues in C++. If not, then there are enough stuff to consider in >C++ itself. > > > 4.Is Dev-c++ a good tool for learning c++? > >Yeah, I believe. > > > 5.After I have learnt those basic concepts, by which way I > > shoud get further concepts? For example the concepts about > > Windows applications development. > >It again, actually, dependes on your needs and interests. As I >told, there are enough stuff to focus on in C++ itself. But you >can, as well, get into the different applications using C++. > >Regards, >--Hossein >-- _________________________________________________________________ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger |
|
From: Glen V. <gve...@pa...> - 2003-10-11 14:32:43
|
Hi, I was wondering where I should best place my include files. Suppose I have a class testClass which needs to include a couple of files. Should I place the include-statements in the .cpp files or in the .h (so one could see which files are needed?)? Or does it depend on the circomstances? For example: include-files which contain the type of declared members in the header, and include-files needed for the implementation in the .cpp file? Are there rules, or am I free to choose? Please enlighten me :-) . |
|
From: Hossein H. <ult...@em...> - 2003-10-11 08:32:01
|
Dear lavaspan, >I am a beginner, but I am learning. Good Luck! > 1.Is Bjarne Stroustrup's The C++ Programming Language suited > for a beginner? Yep! But not as the first text. In my idea, the best book as a first text is: "Accelerated C++", just take a look at: http://www.acceleratedcpp.com Anyway, after reading the first text, I recommend TC++PL, and a look to the two other famous "general purpose" C++ books, i.e., "The C++ Primer," and "C++: How to Programme". (Look for the latest versions.) > 2.Which c++ complier is recommended for learning pure c++? There are not so much options, but GCC, Comeau C++, and Intel C++ are the most Standard compliant ones. (Don't forget that there is no fully Standard compliant compiler.) > 3.I don't want to use some popular comercial c++ development > tools such as Microsoft's Visual C++ or Borland' C++ Builder. > Is learning basic c++ concepts a good idea, or how about > straightly learning those popular tools? Hmmm... It completely depends on your purposes; If you want to do things which I call "Developery stuff," you've got to bypass deep issues in C++. If not, then there are enough stuff to consider in C++ itself. > 4.Is Dev-c++ a good tool for learning c++? Yeah, I believe. > 5.After I have learnt those basic concepts, by which way I > shoud get further concepts? For example the concepts about > Windows applications development. It again, actually, dependes on your needs and interests. As I told, there are enough stuff to focus on in C++ itself. But you can, as well, get into the different applications using C++. Regards, --Hossein -- __________________________________________________________ Sign-up for your own personalized E-mail at Mail.com http://www.mail.com/?sr=signup CareerBuilder.com has over 400,000 jobs. Be smarter about your job search http://corp.mail.com/careers |
|
From: lavaspan <lav...@ey...> - 2003-10-11 07:32:19
|
I want to get some help for how to learn c++ as a beginner. For me ,it is really important to get some advice because I am just learning c++ by mostly myself, escept for some information form the Internet, without out any further helps specifically for me. I have got some books published in English, but you know, English is a foreign language to me. I don't think that I can understand all the points in my self-learning course,so for now I cannot say what I really want.The several upcoming points are some questions that I am majorly want to get, so if anybody who can give me some help, or who has some experience in you past learning periods, please mail to me. If not to bother other people, please mail to me at lav...@ey... I am a beginner, but I am learning. My questions: 1.Is Bjarne Stroustrup's The C++ Programming Language suited for a beginner? 2.Which c++ complier is recommended for learning pure c++? 3.I don't want to use some popular comercial c++ development tools such as Microsoft's Visual C++ or Borland' C++ Builder. Is learning basic c++ concepts a good idea, or how about straightly learning those popular tools? 4.Is Dev-c++ a good tool for learning c++? 5.After I have learnt those basic concepts, by which way I shoud get further concepts? For example the concepts about Windows applications development. --http://www.eyou.com --Îȶ¨¿É¿¿µÄÃâ·Ñµç×ÓÐÅÏä ÓïÒôÓʼþ ÒÆ¶¯ÊéÇ© ÈÕÀú·þÎñ ÍøÂç´æ´¢...ÒÚÓÊδ¾¡ DATA |
|
From: Mark L. <mli...@ip...> - 2003-10-11 05:23:34
|
On Thu, 09 Oct 2003 16:27:45 +0200 Wobien <wo...@pl...> wrote:
W> Using assert is supposed to be a big help in finding bugs in your program.
W>
W> #include <cassert>
W> assert(a<b);
W>
W> should stop your program if a>=b and print the file and line number of the
W> assert statement that failed, if and only if you run in debug mode. If you
W> are not in debug mode, the assert statements should not be compiled.
W>
W> Now I have 2 problems:
W>
W> 1: my program stops if the assert fails, even if I did not compile in the
W> debug mode.
Wrap it in some compile time checked #defines.
W> 2: when the program stops it does not wait and stop to give me the
W> opportunity to read the message about the file and line number. The system
W> ("PAUSE"); statement at the end of the main procedure does not help here,
W> because the program never gets there.
W>
W> A simple test "program" to try this is:
W>
W> #include <stdlib.h>
W> #include <cassert>
W> int main()
W> {
W> int a=5;
W> int b=1;
W> assert(a<b);
W> system ("PAUSE");
W> return 0;
W> }
Would you accept "start using wxWindows then you can have more intelligent
assert processing / logging" as an answer? ;-) Thereagain, you are using C and
not C++ so that may not be such a good answer anyway.
MarkL
|
|
From: Wobien <wo...@pl...> - 2003-10-10 21:14:15
|
Thanks Daniel and others for your suggestions.
The #define NDEBUG suggested by jo mateix works fine to prevent the
assertions to compile.
I already tried to run my program from the DOS prompt, but I did it by
closing Windows and start computer in DOS mode. When I do that I get "This
program cannot be run in the DOS mode".
When I do it the way Daniel suggests it works fine, and I can read the
message.
Wobien
----- Original Message -----
From: "Daniel Glenfield" <sp...@ho...>
To: <wo...@pl...>
Sent: Friday, October 10, 2003 11:54 AM
Subject: Re: [Dev-C++] using assert
> Try something like
>
> #if DEBUG
> assert(a<b);
> #endif
>
> and see if that does anything when compiling in Release mode.
>
> As for the irritating closing of the console window you'll need to run the
> program from a dos prompt.
>
> So do Start -> Accessories -> Command Prompt (it all depends on what OS
you
> have - in ME it is in Start itself).
> Type
> cd C:\Dev-CPP\MyTest\ <--- this is where the exe is
>
> then type
> MyTestProgram.exe
>
> That should work.
>
> Daniel
>
>
> >From: Wobien <wo...@pl...>
> >Reply-To: Wobien <wo...@pl...>
> >To: dev-cpp-users-list <dev...@li...>
> >Subject: [Dev-C++] using assert
> >Date: Thu, 09 Oct 2003 16:27:45 +0200
> >
> >Using assert is supposed to be a big help in finding bugs in your
program.
> >
> >#include <cassert>
> >assert(a<b);
> >
> >should stop your program if a>=b and print the file and line number of
the
> >assert statement that failed, if and only if you run in debug mode. If
you
> >are not in debug mode, the assert statements should not be compiled.
> >
> >Now I have 2 problems:
> >
> >1: my program stops if the assert fails, even if I did not compile in the
> >debug mode.
> >
> >2: when the program stops it does not wait and stop to give me the
> >opportunity to read the message about the file and line number. The
system
> >("PAUSE"); statement at the end of the main procedure does not help here,
> >because the program never gets there.
> >
> >A simple test "program" to try this is:
> >
> >#include <stdlib.h>
> >#include <cassert>
> >int main()
> >{
> > int a=5;
> > int b=1;
> > assert(a<b);
> > system ("PAUSE");
> > return 0;
> >}
> >
> >
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by: SF.net Giveback Program.
> >SourceForge.net hosts over 70,000 Open Source Projects.
> >See the people who have HELPED US provide better services:
> >Click here: http://sourceforge.net/supporters.php
> >_______________________________________________
> >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
>
> _________________________________________________________________
> Stay in touch with absent friends - get MSN Messenger
> http://www.msn.co.uk/messenger
>
|
|
From: Hossein H. <ult...@em...> - 2003-10-10 15:38:44
|
Hi Leonel, > This is my first message to this list and i'm sorry by my bad english > speaking. > The question is ¿where is the 100% ISO/C++ compilant compiler?? I'm learning > C++ step by step in the free time between my visual fox developer work and > the university and i was read a hundred articles about the ISO compilant of > that compiler but no one about a compiler like that... I'm not sure if they do not like to be compliant (except for MS implementations). But, AFAIK, the problem is that beeing completely compliant is not that easily feasible. Read the following article written by Herb Sutter: "C++ Conformance Roundup". (I couldn't find the link according to the server problems, but take heart and search for it!) > There is some one? Unfortunately, no! > There is a project of something like that? Hmmm... Every implementation (by default) wants to be compliant to be more widely usable. So there are lots of them! > Why the GNU compiler is not one? They're one of the ones trying to achieve that. Regards, --Hossein -- __________________________________________________________ Sign-up for your own personalized E-mail at Mail.com http://www.mail.com/?sr=signup CareerBuilder.com has over 400,000 jobs. Be smarter about your job search http://corp.mail.com/careers |
|
From: stefan k. <ste...@ya...> - 2003-10-10 14:53:03
|
Hi list! This question goes to the more experienced devs on this list: Has anyone of you made performance tests comparing the code optimization results of the MingW compiler with what you can gain with MS VC++ 6.0? I'm especially interested in multimedia performance tests - processing large buffers of 32bit floats, computing complex floating-point algorithms, moving large blocks of memory, etc. MS VC++ 6.0 does a fairly good job optimizing the output code, only beeing beaten by the Intel-C++ compiler in some cases. Anyone having any figures where Gcc/MingW optimization stands? Best, Stefan |
|
From: Hossein H. <ult...@em...> - 2003-10-10 14:43:15
|
Dear Joe, > I'm trying to build a simple text editor that edits text and saves them. > This is working fine. My question is that I want to implement a custom > syntax highlighting to it. Can anyone make any recommendations to me on how > to implement something like this? I myself don't know how, but I've heared that XML has got stuff, using which having these done gets easier than eating a dock soup! Regards, --Hossein PS: Are you using Borland stuff? If yes, it is best to take a look to: http://www.thebits.org -- __________________________________________________________ Sign-up for your own personalized E-mail at Mail.com http://www.mail.com/?sr=signup CareerBuilder.com has over 400,000 jobs. Be smarter about your job search http://corp.mail.com/careers |
|
From: Opacki, J. <Jos...@ng...> - 2003-10-10 14:19:23
|
That's the best comeback line I've read all day! -----Original Message----- From: Daniel Glenfield [mailto:sp...@ho...] Sent: Friday, October 10, 2003 10:15 AM To: F.W...@wi...; dev...@li...; Opacki, Joseph Subject: Re: Antw: RE: [Dev-C++] ISO C++ Compiler imatch.com and SinglesPlus.net deal with those sorts of requests ;) >From: "Frank Wagner" <F.W...@wi...> >To: <dev...@li...>,<Jos...@ng...> >Subject: Antw: RE: [Dev-C++] ISO C++ Compiler >Date: Fri, 10 Oct 2003 10:31:56 +0200 > >Hi, > >I'm using Dev-Cpp with Cygwin and it works for me in the most cases. >I also looking for someone I can share experiences with. > >Greetings > >Frank > > >>> "Opacki, Joseph" <Jos...@ng...> 10/09 5:31 >>> >Although I thought I had read somewhere that you could plug Dev-C++ to = work >with Cygwin. That would be very interesting for me to see. If anyone = out >there has done something like this, please share or point me to a = page. > >Thanks. > >-----Original Message----- >From: David McKen [mailto:ci...@ya...] >Sent: Wednesday, October 08, 2003 6:13 PM >To: dev...@li... >Subject: Re: [Dev-C++] ISO C++ Compiler > > >First let me point out that Dev-C++ is NOT a compiler, it >uses Mingw >(avalible at www.mingw.org) as the compiler, on top of >which Dev-C++ adds an >Integrated Desktop Enviroment (IDE). > >As for mingw, I am not too sure about ISO but it is ANSI >compliant (I am >guessing they are similar at the very least). The thing to >watch out for is >the extensions that are avalible. Mingw is a copy-cat >version of the gcc/g++ >compilers (avalible on almost all Unixes) that runs on and >generates win32 >executables. As for the extensions they can be turned off >by using the >"-ansi" switch. > >If you need any more information either someone else on the >list may be able >to help you or check out the Mingw web site. > >Signed >David McKen > > >----- Original Message ----- >From: "Leonel Quinteros" <qui...@ho...> >To: <dev...@li...> >Sent: Wednesday, October 08, 2003 5:48 PM >Subject: [Dev-C++] ISO C++ Compiler > > > > Hi List! > > This is my first message to this list and i'm sorry by my >bad english > > speaking. > > The question is =BFwhere is the 100% ISO/C++ compilant >compiler?? I'm >learning > > C++ step by step in the free time between my visual fox >developer work and > > the university and i was read a hundred articles about >the ISO compilant >of > > that compiler but no one about a compiler like that... > > There is some one? > > There is a project of something like that? > > Why the GNU compiler is not one? > > > > Greetings > > > > Leonel > > > > >_________________________________________________________________ > > Charla con tus amigos en l=EDnea mediante MSN Messenger: > > http://messenger.yupimsn.com/ > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback >Program. > > SourceForge.net hosts over 70,000 Open Source Projects. > > See the people who have HELPED US provide better >services: > > Click here: http://sourceforge.net/supporters.php > > _______________________________________________ > > 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 > > >__________________________________ >Do you Yahoo!? >The New Yahoo! Shopping - with improved product search >http://shopping.yahoo.com > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >SourceForge.net hosts over 70,000 Open Source Projects. >See the people who have HELPED US provide better services: >Click here: http://sourceforge.net/supporters.php >_______________________________________________ >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 > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >SourceForge.net hosts over 70,000 Open Source Projects. >See the people who have HELPED US provide better services: >Click here: http://sourceforge.net/supporters.php >_______________________________________________ >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 > > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >SourceForge.net hosts over 70,000 Open Source Projects. >See the people who have HELPED US provide better services: >Click here: http://sourceforge.net/supporters.php >_______________________________________________ >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 _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today!=20 http://www.msn.co.uk/messenger |
|
From: Daniel G. <sp...@ho...> - 2003-10-10 14:15:23
|
imatch.com and SinglesPlus.net deal with those sorts of requests ;) >From: "Frank Wagner" <F.W...@wi...> >To: <dev...@li...>,<Jos...@ng...> >Subject: Antw: RE: [Dev-C++] ISO C++ Compiler >Date: Fri, 10 Oct 2003 10:31:56 +0200 > >Hi, > >I'm using Dev-Cpp with Cygwin and it works for me in the most cases. >I also looking for someone I can share experiences with. > >Greetings > >Frank > > >>> "Opacki, Joseph" <Jos...@ng...> 10/09 5:31 >>> >Although I thought I had read somewhere that you could plug Dev-C++ to work >with Cygwin. That would be very interesting for me to see. If anyone out >there has done something like this, please share or point me to a page. > >Thanks. > >-----Original Message----- >From: David McKen [mailto:ci...@ya...] >Sent: Wednesday, October 08, 2003 6:13 PM >To: dev...@li... >Subject: Re: [Dev-C++] ISO C++ Compiler > > >First let me point out that Dev-C++ is NOT a compiler, it >uses Mingw >(avalible at www.mingw.org) as the compiler, on top of >which Dev-C++ adds an >Integrated Desktop Enviroment (IDE). > >As for mingw, I am not too sure about ISO but it is ANSI >compliant (I am >guessing they are similar at the very least). The thing to >watch out for is >the extensions that are avalible. Mingw is a copy-cat >version of the gcc/g++ >compilers (avalible on almost all Unixes) that runs on and >generates win32 >executables. As for the extensions they can be turned off >by using the >"-ansi" switch. > >If you need any more information either someone else on the >list may be able >to help you or check out the Mingw web site. > >Signed >David McKen > > >----- Original Message ----- >From: "Leonel Quinteros" <qui...@ho...> >To: <dev...@li...> >Sent: Wednesday, October 08, 2003 5:48 PM >Subject: [Dev-C++] ISO C++ Compiler > > > > Hi List! > > This is my first message to this list and i'm sorry by my >bad english > > speaking. > > The question is ¿where is the 100% ISO/C++ compilant >compiler?? I'm >learning > > C++ step by step in the free time between my visual fox >developer work and > > the university and i was read a hundred articles about >the ISO compilant >of > > that compiler but no one about a compiler like that... > > There is some one? > > There is a project of something like that? > > Why the GNU compiler is not one? > > > > Greetings > > > > Leonel > > > > >_________________________________________________________________ > > Charla con tus amigos en línea mediante MSN Messenger: > > http://messenger.yupimsn.com/ > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback >Program. > > SourceForge.net hosts over 70,000 Open Source Projects. > > See the people who have HELPED US provide better >services: > > Click here: http://sourceforge.net/supporters.php > > _______________________________________________ > > 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 > > >__________________________________ >Do you Yahoo!? >The New Yahoo! Shopping - with improved product search >http://shopping.yahoo.com > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >SourceForge.net hosts over 70,000 Open Source Projects. >See the people who have HELPED US provide better services: >Click here: http://sourceforge.net/supporters.php >_______________________________________________ >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 > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >SourceForge.net hosts over 70,000 Open Source Projects. >See the people who have HELPED US provide better services: >Click here: http://sourceforge.net/supporters.php >_______________________________________________ >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 > > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >SourceForge.net hosts over 70,000 Open Source Projects. >See the people who have HELPED US provide better services: >Click here: http://sourceforge.net/supporters.php >_______________________________________________ >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 _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger |
|
From: Opacki, J. <Jos...@ng...> - 2003-10-10 11:35:36
|
Frank, My experience so far has been with VSC++, and now Dev-C++, in which I = prefer Dev-C++ over the M$ product. Unfortunately my experience has been = limited to Windows and I am only starting to branch out into the Unix/Linux = markets. Cygwin is a good choice for me since I won't have to forfeit my windows environment, however, command line compiling and writing my own make = file is foreign to me. When I read the you could tie Dev-C++ into Cygwin and = use g++, I wanted to get as much information as I could. Joe -----Original Message----- From: Frank Wagner [mailto:F.W...@wi...] Sent: Friday, October 10, 2003 4:32 AM To: dev...@li...; Opacki, Joseph Subject: Antw: RE: [Dev-C++] ISO C++ Compiler Hi, I'm using Dev-Cpp with Cygwin and it works for me in the most cases. I also looking for someone I can share experiences with. Greetings Frank >>> "Opacki, Joseph" <Jos...@ng...> 10/09 5:31 >>> Although I thought I had read somewhere that you could plug Dev-C++ to = work with Cygwin. That would be very interesting for me to see. If anyone = out there has done something like this, please share or point me to a page. Thanks. -----Original Message----- From: David McKen [mailto:ci...@ya...]=20 Sent: Wednesday, October 08, 2003 6:13 PM To: dev...@li...=20 Subject: Re: [Dev-C++] ISO C++ Compiler First let me point out that Dev-C++ is NOT a compiler, it uses Mingw (avalible at www.mingw.org) as the compiler, on top of which Dev-C++ adds an Integrated Desktop Enviroment (IDE). As for mingw, I am not too sure about ISO but it is ANSI compliant (I am guessing they are similar at the very least). The thing to watch out for is the extensions that are avalible. Mingw is a copy-cat version of the gcc/g++ compilers (avalible on almost all Unixes) that runs on and generates win32 executables. As for the extensions they can be turned off by using the "-ansi" switch. If you need any more information either someone else on the list may be able to help you or check out the Mingw web site. Signed David McKen ----- Original Message -----=20 From: "Leonel Quinteros" <qui...@ho...> To: <dev...@li...> Sent: Wednesday, October 08, 2003 5:48 PM Subject: [Dev-C++] ISO C++ Compiler > Hi List! > This is my first message to this list and i'm sorry by my bad english > speaking. > The question is =BFwhere is the 100% ISO/C++ compilant compiler?? I'm learning > C++ step by step in the free time between my visual fox developer work and > the university and i was read a hundred articles about the ISO compilant of > that compiler but no one about a compiler like that... > There is some one? > There is a project of something like that? > Why the GNU compiler is not one? > > Greetings > > Leonel > > _________________________________________________________________ > Charla con tus amigos en l=EDnea mediante MSN Messenger: > http://messenger.yupimsn.com/=20 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li...=20 > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm=20 > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com=20 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php=20 _______________________________________________ Dev-cpp-users mailing list Dev...@li...=20 TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm=20 https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php=20 _______________________________________________ Dev-cpp-users mailing list Dev...@li...=20 TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm=20 https://lists.sourceforge.net/lists/listinfo/dev-cpp-users ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ 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 |
|
From: Frank W. <F.W...@wi...> - 2003-10-10 10:26:08
|
Hi, I'm using Dev-Cpp with Cygwin and it works for me in the most cases. I also looking for someone I can share experiences with. Greetings Frank >>> "Opacki, Joseph" <Jos...@ng...> 10/09 5:31 >>> Although I thought I had read somewhere that you could plug Dev-C++ to = work with Cygwin. That would be very interesting for me to see. If anyone out there has done something like this, please share or point me to a page. Thanks. -----Original Message----- From: David McKen [mailto:ci...@ya...]=20 Sent: Wednesday, October 08, 2003 6:13 PM To: dev...@li...=20 Subject: Re: [Dev-C++] ISO C++ Compiler First let me point out that Dev-C++ is NOT a compiler, it uses Mingw (avalible at www.mingw.org) as the compiler, on top of which Dev-C++ adds an Integrated Desktop Enviroment (IDE). As for mingw, I am not too sure about ISO but it is ANSI compliant (I am guessing they are similar at the very least). The thing to watch out for is the extensions that are avalible. Mingw is a copy-cat version of the gcc/g++ compilers (avalible on almost all Unixes) that runs on and generates win32 executables. As for the extensions they can be turned off by using the "-ansi" switch. If you need any more information either someone else on the list may be able to help you or check out the Mingw web site. Signed David McKen ----- Original Message -----=20 From: "Leonel Quinteros" <qui...@ho...> To: <dev...@li...> Sent: Wednesday, October 08, 2003 5:48 PM Subject: [Dev-C++] ISO C++ Compiler > Hi List! > This is my first message to this list and i'm sorry by my bad english > speaking. > The question is =BFwhere is the 100% ISO/C++ compilant compiler?? I'm learning > C++ step by step in the free time between my visual fox developer work and > the university and i was read a hundred articles about the ISO compilant of > that compiler but no one about a compiler like that... > There is some one? > There is a project of something like that? > Why the GNU compiler is not one? > > Greetings > > Leonel > > _________________________________________________________________ > Charla con tus amigos en l=EDnea mediante MSN Messenger: > http://messenger.yupimsn.com/=20 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li...=20 > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm=20 > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com=20 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php=20 _______________________________________________ Dev-cpp-users mailing list Dev...@li...=20 TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm=20 https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php=20 _______________________________________________ Dev-cpp-users mailing list Dev...@li...=20 TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm=20 https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: P.D. v. Z. <pa...@my...> - 2003-10-10 10:13:36
|
What kind of advice is that? :| Do you know anything about C or C++ at all? C does not know about the concept of namespaces, so "using namespace std" would only generate an error. As for the C++ "#include <conio>", this will not work either. conio is not, never was, and never will be a standard header, and trying to include it in the C++ header fashion won't make any difference whatsoever, you'll still get errors. And of course, conio.h isn't a standard header for C either, so the chances of "#include <conio.h>" working are small too. MingW provides a contributed (and broken) conio implementation, because so many Borland and Microsoft users think this header is standard, and come crying to the lists when it doesn't work on a standards-compliant compiler. My advice is to avoid conio at all costs. For Win32 you're much better off using the Win32 API to accomplish the same tasks (positioning the cursor, etc), and for true DOS console manipulation you should be using a different compiler (try DJGPP for example), because MingW is for Win32, and creates only Win32 executables. You could also look for a "curses" implementation, which tends to be a bit better at cross-platform compiling, and is a true third-party library, not something people expect to be standard but isn't. Regards, Paul -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Alvin Thompson Sent: Friday, October 10, 2003 12:41 AM To: al...@vi...; co...@gm...; dev...@li... Subject: Re: [Dev-C++] conio for c++: #include <conio> for c: #include <conio.h> for both: using namespace std hth, alvin ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ 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 |
|
From: Damien A <g_...@ho...> - 2003-10-10 10:08:12
|
<html><div style='background-color:'><DIV>
<P><BR><BR></P>
<DIV></DIV>
<P><BR><BR></P></DIV>
<DIV></DIV>
<DIV></DIV><?xml:namespace prefix = mailto /><mailto:dev...@li...?subject=help><mailto:dev...@li...><mailto:dev...@li...?subject=subscribe><mailto:dev...@li...?subject=unsubscribe>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>1)After checking the assert.h header file included in cygwin, I saw this
<DIV></DIV>
<P>/*<BR> assert.h<BR>*/</P>
<DIV></DIV>
<P>#ifdef __cplusplus<BR>extern "C" {<BR>#endif</P>
<DIV></DIV>
<P>#include "_ansi.h"</P>
<DIV></DIV>
<P>#undef assert</P>
<DIV></DIV>
<P>#ifdef NDEBUG /* required by ANSI standard */<BR>#define assert(p) ((void)0)<BR>#else</P>
<DIV></DIV>
<P>So you see why it still compiled even without being in debug mode. You are required to define NDEBUG.</P>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>2) Different compilers handle assert differently, but in this case, the message is sent to the console window, so I suggest running the program from the console and see the result. If you have VC++6, try this program.
<DIV></DIV>
<P>#define WIN32_LEAN_AND_MEAN<BR>#include <windows.h><BR>#include <stdlib.h><BR>#include <cassert><BR>int __stdcall WinMain(HINSTANCE,HINSTANCE,LPSTR,int)<BR>{<BR> int a=5;<BR> int b=1;<BR> assert(a<b);<BR> system ("PAUSE");<BR> return 0;<BR>}</P>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<P>It'll give you the message box you so desire :)</P>
<P>------------------------------------------------------- </P>
<DIV></DIV>
<DIV></DIV>This SF.net email is sponsored by: SF.net Giveback Program.
<DIV></DIV>
<DIV></DIV>SourceForge.net hosts over 70,000 Open Source Projects.
<DIV></DIV>
<DIV></DIV>See the people who have HELPED US provide better services:
<DIV></DIV>
<DIV></DIV>Click here: http://sourceforge.net/supporters.php
<DIV></DIV>
<DIV></DIV>_______________________________________________
<DIV></DIV>
<DIV></DIV>Dev-cpp-users mailing list
<DIV></DIV>
<DIV></DIV>Dev...@li...
<DIV></DIV>
<DIV></DIV>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
<DIV></DIV>
<DIV></DIV>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
<DIV></DIV>
<DIV></DIV></mailto:dev...@li...?subject=unsubscribe></mailto:dev...@li...?subject=subscribe></mailto:dev...@li...></mailto:dev...@li...?subject=help></div><br clear=all><hr>Help STOP SPAM with <a href="http://g.msn.com/8HMBEN/2731??PS=">the new MSN 8 </a> and get 2 months FREE*</html>
|
|
From: jo m. <non...@ho...> - 2003-10-10 10:04:13
|
I don't know what you mean by "compiling in debug mode", but if you want the
"assertions" not to be compiled I think you should
#define NDEBUG
either in the source code or trough the command line.
I hope it helps.
>From: Wobien <wo...@pl...>
>Reply-To: Wobien <wo...@pl...>
>To: dev-cpp-users-list <dev...@li...>
>Subject: [Dev-C++] using assert
>Date: Thu, 09 Oct 2003 16:27:45 +0200
>
>Using assert is supposed to be a big help in finding bugs in your program.
>
>#include <cassert>
>assert(a<b);
>
>should stop your program if a>=b and print the file and line number of the
>assert statement that failed, if and only if you run in debug mode. If you
>are not in debug mode, the assert statements should not be compiled.
>
>Now I have 2 problems:
>
>1: my program stops if the assert fails, even if I did not compile in the
>debug mode.
>
>2: when the program stops it does not wait and stop to give me the
>opportunity to read the message about the file and line number. The system
>("PAUSE"); statement at the end of the main procedure does not help here,
>because the program never gets there.
>
>A simple test "program" to try this is:
>
>#include <stdlib.h>
>#include <cassert>
>int main()
>{
> int a=5;
> int b=1;
> assert(a<b);
> system ("PAUSE");
> return 0;
>}
>
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
|
|
From: Alvin T. <al...@th...> - 2003-10-09 22:41:33
|
for c++: #include <conio> for c: #include <conio.h> for both: using namespace std hth, alvin |
|
From: David M. <ci...@ya...> - 2003-10-09 22:21:49
|
Ok, point taken. I am not going to stop though. For me this is another of my personal projects that help me learn. Guess I will point them towards GMP and the Large Number class on sourceforge.net (a class I am fighting to understand as I see alot of pre-processor directives). No assembly! I am fighting for portability, asm is one of the fastest ways to break that portability. Damn, I am such an idiot. That would work extremly well! Thanks! The only difference is I add the overflow to the next block. The only bit I was worrying about was the carry bit. Thanks Per Signed David McKen ----- Original Message ----- From: "Per Westermark" <pw...@ia...> To: "David McKen" <ci...@ya...> Cc: "Dev-C Mailing List" <dev...@li...> Sent: Thursday, October 09, 2003 9:57 AM Subject: Re: [Dev-C++] Overflow detection (was No Subject) > Are you also sick of the existing large-number libraries that exists, and > that supports any number of digits up to size of available memory? > > To my knowledge, you can't write a portable implementation using > overflow exceptions. The normal method is for example to perform all > big-number arithmetic with unsigned numbers and a separately stored sign > bit. > > Then you get: > > r0 = a0 + b0; > overflow = r0 < a0 || r0 < b0; > r1 = a1 + b1 + overflow; > .. > > No need to work on bit level. > > If implemented in assembly, the > overflow = r0 < a0 || r0 < b0 > can be ignored, since an overflow would result in the carry bit being set > in the processor flag register - all processors have support for carry > bit. > > /Per W > > On Thu, 9 Oct 2003, David McKen wrote: > > > No I don't require it to be standard, however I would like > > it to be standard. > > > > My current focus are speed and portability. The reason why > > 64 bit won't sufice is because I would like to take a try > > at the RSA factoring challenge: > > > > http://www.rsasecurity.com/rsalabs/challenges/factoring/faq.html > > > > And if you look throught you will eventually find the > > challenge numbers at > > > > http://www.rsasecurity.com/rsalabs/challenges/factoring/numbers.html > > > > IF you take a look at those numbers then you will quickly > > see why 64 bit is too small. Besides if I complete this > > class I know at least 3-4 people who would use it because > > they are sick of the 4 billlion limitation put on them. > > > > Thanks for your Help > > > > Signed > > David McKen > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search > > http://shopping.yahoo.com > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. > > SourceForge.net hosts over 70,000 Open Source Projects. > > See the people who have HELPED US provide better services: > > Click here: http://sourceforge.net/supporters.php > > _______________________________________________ > > 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 > > > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
|
From: <qa...@ho...> - 2003-10-09 21:47:50
|
1) I have no idea if the 'assert' function only should be compiled in=
debug-mode so I can't help you here.
2) When an assertion fails the program exits with an errorcode, this is the=
normal behaviour and as a result your window gets closed.
The only way I know of to work around this is to start the program from a=
dospromt, and not from within Dev-C++.
/J
*********** REPLY SEPARATOR ***********
On 2003-10-09 at 16:27 Wobien wrote:
>Using assert is supposed to be a big help in finding bugs in your program.
>
>#include <cassert>
>assert(a<b);
>
>should stop your program if a>=3Db and print the file and line number of=
the
>assert statement that failed, if and only if you run in debug mode. If you
>are not in debug mode, the assert statements should not be compiled.
>
>Now I have 2 problems:
>
>1: my program stops if the assert fails, even if I did not compile in the
>debug mode.
>
>2: when the program stops it does not wait and stop to give me the
>opportunity to read the message about the file and line number. The system
>("PAUSE"); statement at the end of the main procedure does not help here,
>because the program never gets there.
>
>A simple test "program" to try this is:
>
>#include <stdlib.h>
>#include <cassert>
>int main()
>{
> int a=3D5;
> int b=3D1;
> assert(a<b);
> system ("PAUSE");
> return 0;
>}
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>SourceForge.net hosts over 70,000 Open Source Projects.
>See the people who have HELPED US provide better services:
>Click here: http://sourceforge.net/supporters.php
>_______________________________________________
>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
|
|
From: Alessandro B. <al...@vi...> - 2003-10-09 20:27:45
|
#include <conio.cpp> ----- Original Message -----=20 From: Coosa=20 To: dev...@li...=20 Sent: Wednesday, October 08, 2003 9:39 PM Subject: [Dev-C++] conio Dear all, I'm using DEV C++ 4.9.8.3 and under the include directory the = following 2 files are available: conio.h and conio.cpp The problem is that I can't use the functions inside such as clrscr(), = clreol(), .etc. Any one can answer me how to use them? Best regards Coosa |
|
From: <Tod...@De...> - 2003-10-09 18:12:27
|
hi everyone,
I need help on transfering the data(name & password) from my home page to my
geturl.c.
the problem is... my geturl.c is runninb but it is waiting for me to key in
something.
I am using Dev-C++ 4.8. I will be very happy with any help. thanks
Todd c.
-----------------------------------------------------------
my geturl.c file:
-----------------------
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main()
{
FILE *ifile;
char buf[256], instr[64], *p='\0';
int i;
fgets(instr, 64, stdin);
instr[63]='\0';
p=instr;
printf("==> p: %s \n",instr);
while (*p){
if (*p=='%'){
strncpy(buf,p+1,2);
buf[2]='\0';
*p=strtol(buf,NULL,16);
strcpy(p+1,p+3);
} // if
p++;
} // while
if (p = strchr(instr, '='))
strcpy(instr,&p[1]);
if (p = strchr(instr, '\r'))
*p='\0';
if (p = strchr(instr, '\n'))
strcpy(instr,&p[1]);
printf("==>after p: %s \n",p);
fflush(stdout);
return 0;
}
---------------------------------
part of my homepage file which is on my c: drive.
<TR>
<FORM action=file://LocalHost/C:/Dev-C++/geturl.exe>
<TD vAlign=bottom>
<DIV class=tinyblack><B>User Name <BR>
</B></DIV><INPUT name=username><BR></TD>
<DIV class=tinyblack><B>Password</B></DIV><INPUT
type=password
name=password><BR></TD>
<input type="submit">
</TD></FORM></TR>
------------------------------------
todd c.
|