dev-cpp-users Mailing List for Dev-C++ (Page 596)
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: Jason H. <jas...@bt...> - 2002-04-22 17:41:39
|
The queueElement idetifier has no relevance outside of the template class scope. Inside of the class
the compiler will sustitute the name for the relevent type that was specified for creation, in this
case it is int. You can treat the identifier as something similar to a typedef which is targeted at
that particular class.
There may also be a problem with the ostream friend declaration, but I'm not sure. I'd have to do
some research to figure it out.
Jason.
----- Original Message -----
From: <Wal...@va...>
To: <dev...@li...>
Sent: Monday, April 22, 2002 4:03 PM
Subject: [Dev-C++] templates
I am getting these errors/warnings, need some help please.
Walt
(Embedded image moved to file: pic06617.pcx)
This in .cpp file:
#include <iostream.h>
#include <stdlib.h>
#include <ctype.h>
#include "Temp.h"
void ShowCommands ();
int main ()
{
char command;
Queue<int>q;
queueElement item;
This is in the Temp.h file:
#include <iostream.h>
#include <stdlib.h>
#ifndef QUEUE
#define QUEUE
const int MAX=401;
int i;
template <class queueElement>
class Queue
{
private:
queueElement myArray[MAX];
int myFront;
int myBack;
public:
friend ostream& operator << (ostream&,
Queue<queueElement> &);
Queue(){myFront=0;myBack=0;};
bool empty();
void addQ(queueElement);
queueElement front();
void removeQ();
bool full();
};
#endif //end of class queu
"This e-mail message is intended only for the use of the named
recipient(s).
The information contained therein may be confidential or privileged, and
its
disclosure or reproduction is strictly prohibited. If you are not the named
recipient, please return it immediately to its sender at the above address
and destroy it."
|
|
From: <Wal...@va...> - 2002-04-22 15:04:33
|
I am getting these errors/warnings, need some help please.
Walt
(Embedded image moved to file: pic06617.pcx)
This in .cpp file:
#include <iostream.h>
#include <stdlib.h>
#include <ctype.h>
#include "Temp.h"
void ShowCommands ();
int main ()
{
char command;
Queue<int>q;
queueElement item;
This is in the Temp.h file:
#include <iostream.h>
#include <stdlib.h>
#ifndef QUEUE
#define QUEUE
const int MAX=401;
int i;
template <class queueElement>
class Queue
{
private:
queueElement myArray[MAX];
int myFront;
int myBack;
public:
friend ostream& operator << (ostream&,
Queue<queueElement> &);
Queue(){myFront=0;myBack=0;};
bool empty();
void addQ(queueElement);
queueElement front();
void removeQ();
bool full();
};
#endif //end of class queu
"This e-mail message is intended only for the use of the named
recipient(s).
The information contained therein may be confidential or privileged, and
its
disclosure or reproduction is strictly prohibited. If you are not the named
recipient, please return it immediately to its sender at the above address
and destroy it."
|
|
From: Christian W. <Chr...@vo...> - 2002-04-22 11:59:52
|
Hi List, Does someone know how to get the number of selected files in the CfileDIalog-Class ??? If I try to itterate through the entrys I get an accessviolation at the end of the list ... Kind r Christian |
|
From: Yeoh H. <ye...@ye...> - 2002-04-22 05:32:47
|
Ccdoc is a javadoc inspired tool that automatically generates web documentation from C++ programs by parsing the source file headers. URL: http://www.joelinoff.com/ccdoc/index.html It's free. Regards, Yeoh ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ Author of "How to Create an eBook Using Visual C++" Free Downloads at http://www.yeohhs.com ICT eBooks by Yeoh HS ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ |
|
From: Luigi S. <gi...@li...> - 2002-04-22 03:58:58
|
Hello all, looking at some HTML files related to gcc 2.8.1 (I can't remember where I got them), I found the file attached to this mail, it explains how variable length arrays work (guess things are still valid for version > 2.8.1) Also I have tried the command: gcc -ansi -pendantic -c vla.cpp where - vla.cpp contains code posted by Bob Wilson in the first message of the thread - gcc is the version 2.95.2 19991024 (the one shipped with Dev-C++ 4.0) and it gives the expected warning -- Luigi |
|
From: Yeoh H. <ye...@ye...> - 2002-04-22 01:57:43
|
Hi, Assuming that you're using Win32 API, here's some extracts from the MSDN. To enable or disable a dialog control, you'll need to use GetDlgItem function. The GetDlgItem function retrieves the handle of a control in the specified dialog box. Once you have the handle, you can disable the control with this function: BOOL EnableWindow( HWND hWnd, // handle to window BOOL bEnable // flag for enabling or disabling input ); The EnableWindow function enables or disables mouse and keyboard input to the specified window or control. When input is disabled, the window does not receive input such as mouse clicks and key presses. When input is enabled, the window receives all input. Regards, Yeoh ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ Author of "How to Create an eBook Using Visual C++" Free Downloads at http://www.yeohhs.com ICT eBooks by Yeoh HS ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ ----- Original Message ----- From: Daniel Glenfield <sp...@ho...> To: <dev...@li...> Sent: Monday, April 22, 2002 3:26 AM Subject: [Dev-C++] dialog box > > I'm using VC++ 6.0 to make a dialog box. I have two radio buttons, with a > drop down menu next to each. > Does anyone know how to make it so that when radio A is selected, radio B > and it's drop down menu is greyed out and unselectable? I have got both > buttons alternating, so both cannot be selected at once using Tab Order and > the group checkbox on the first. > > any ideas? > > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Yeoh HS <ye...@ye...> - 2002-04-22 01:39:31
|
Hi, To download sources codes located in CVS repository, you'll need cvs software. A useful tool that I use is WinCvs 1.2. The URL is http://www.cvsgui.org. Regards, Yeoh ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ Author of "How to Create an eBook Using Visual C++" Free Downloads at http://www.yeohhs.com ICT eBooks by Yeoh HS ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ ----- Original Message ----- From: Brandon Bayles <bj...@ho...> To: <dev...@li...> Sent: Monday, April 22, 2002 6:04 AM Subject: [Dev-C++] ??? > I have downloaded Dev-C++, and I'm downloading Delphi 6 for the in order to > compile it. My problem is that i don't know how to get the source code CVS > Repository. > > Thanks > |
|
From: Ioannis V. <no...@ho...> - 2002-04-22 00:03:52
|
> -----Original Message----- > From: David McKen [mailto:ci...@ya...] > Sent: Sunday, April 21, 2002 11:38 PM > To: Ioannis Vranos > Subject: RE: [Dev-C++] Global to local variables > > > static??? > > I was told that it will make sure the varible is initalized to 0 > if it is uninitalized. Not true. > As you can guess I ignored it because I called > it a waste of time > > Anyway thanks Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Jason H. <jas...@bt...> - 2002-04-21 23:19:02
|
It may be useful for you to go here: http://sourceforge.net/docman/?group_id=1 If you go down to sections 6 and 7 there is documentation relating to the use of CVS on sourceforge. Jason. ----- Original Message ----- From: "Brandon Bayles" <bj...@ho...> To: <dev...@li...> Sent: Sunday, April 21, 2002 11:04 PM Subject: [Dev-C++] ??? I have downloaded Dev-C++, and I'm downloading Delphi 6 for the in order to compile it. My problem is that i don't know how to get the source code CVS Repository. Thanks _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Brandon B. <bj...@ho...> - 2002-04-21 22:04:58
|
I have downloaded Dev-C++, and I'm downloading Delphi 6 for the in order to compile it. My problem is that i don't know how to get the source code CVS Repository. Thanks _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
|
From: David M. <ci...@ya...> - 2002-04-21 20:38:52
|
static???
I was told that it will make sure the varible is initalized to 0
if it is uninitalized. As you can guess I ignored it because I called
it a waste of time
Anyway thanks
--- Ioannis Vranos <no...@ho...> wrote:
> Yes using the keyword static. E.g.
>
> void something(void)
> {
> static int x;
> /* ... */
> }
>
>
> x keeps its value between function calls and is created only once.
> This
> type of coding is not suitable for concurrent applications
> (multithreading).
>
>
> Ioannis
>
> * Ioannis Vranos
> * Programming pages: http://www.noicys.cjb.net
> * Alternative URL: http://run.to/noicys
>
>
> > -----Original Message-----
> > From: dev...@li...
> > [mailto:dev...@li...] On Behalf
> > Of David McKen
> > Sent: Saturday, April 20, 2002 11:41 PM
> > To: Dev-C Mailing List
> > Subject: [Dev-C++] Global to local variables
> >
> >
> > I have global varibles in my program that are used by one
> function
> > to keep track of it's state. Is there a way to have a local
> varible
> > to keep it's value between calls?
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Games - play chess, backgammon, pool and more
> > http://games.yahoo.com/
> >
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/
|
|
From: Daniel G. <sp...@ho...> - 2002-04-21 19:26:48
|
I'm using VC++ 6.0 to make a dialog box. I have two radio buttons, with a drop down menu next to each. Does anyone know how to make it so that when radio A is selected, radio B and it's drop down menu is greyed out and unselectable? I have got both buttons alternating, so both cannot be selected at once using Tab Order and the group checkbox on the first. any ideas? _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
|
From: Abhijit S. <mu...@gm...> - 2002-04-21 05:36:12
|
Use the 'static' keyword. For example
MyFunction()
{
static int TimesCalled =3D 0; // Default value, assigned on =
the first call
TimesCalled ++;
printf("TimesCalled is %d\n", TimesCalled);
}
mdeth O
m.o.t.o[P.S.Y.C.H.O]=20
http://mudeth.tripod.com | ibr...@bi... | mu...@gm...
----- Original Message -----=20
From: David McKen=20
To: Dev-C Mailing List=20
Sent: Sunday, April 21, 2002 2:11 AM
Subject: [Dev-C++] Global to local variables
I have global varibles in my program that are used by one function
to keep track of it's state. Is there a way to have a local varible=20
to keep it's value between calls?
__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Ioannis V. <no...@ho...> - 2002-04-20 22:04:44
|
Also regarding MINGW 3.x i saw the following at its web site (http://www.mingw.org): Posted By: earnie Date: 2002-03-07 09:54 Summary: <http://sourceforge.net/forum/forum.php?forum_id=159103> Versions of GCC greater than 2.95.3 MinGW will not be releasing a version of GCC until the official release of GCC-3.1. The current scheduled date for the official release of GCC 3.1 is sometime in April. Please be patient. If you wish to give current 3.x versions a try you're on your own. I guess that GCC 3.0.x is not considered so stable and they wait for 3.1 to port it. Ioannis * Ioannis Vranos * Programming pages: <http://www.noicys.cjb.net/> http://www.noicys.cjb.net * Alternative URL: <http://run.to/noicys> http://run.to/noicys |
|
From: Andres R. <lo...@ho...> - 2002-04-20 21:55:01
|
Hello again! =20 Only one note more.. (I hope this would be the last..) If you really want to get error, not warning, use =96pedantic-error parameter. You can really get an error from that. =20 On MinGW-users list I got inf, that Windows allows allocating stack space in 2 MB chunks maximum. I tested it and it is really true. Maximum variable sized array you can get is around 2M Bait. =20 Andres. |
|
From: Bob W. <bo...@ph...> - 2002-04-20 21:30:44
|
MessageIoannis,
Absolutely correct, but when you assign a value to an enumerated =
element, it practically destroys or greatly limits the ability to use =
the enumerated elements in a for loop or switch statement. =20
Why you can't use them in a switch statement? In fact a switch =
statement is one of the common uses for enums.
If you will re-read what I wrote, you will see I did not say you could =
not use them, however, if you write something like this:
enum animals { cat, dog, horse =3D 7, rabbit =3D 3, pig, cow, mule =3D =
30 }
which is a legal statement, and you write a for loop like this:
int counter;
for (counter =3D cat - 1; counter < mule; counter++)
{
std::cout << "counter =3D " << counter << "\n"
};
The loop will execute 30 times even though there are only seven =
elements. It works, but it can lead to unexpected results if you think =
is it only going to loop seven times because there are only seve =
elements. If no value assignments are given to the set of elements, the =
loop works as a novice might expect. It is certainly possible that there =
is an operation that must not be performed for a cat, once for a dog, =
seven times for a horse, three times for a pig, four times for a cow, =
and 30 times for a mule, and, in that case, you could make the for work. =
However, I doubt that the resulting code would be a decypherable as =
using conditional switching to call an offset function as follows:
#include <iostream.h>
#include <stdlib.h>
enum animals { cat, dog, horse =3D 7, rabbit =3D 3, pig, cow, mule =3D =
30 };
int DoItNow (int NumOfTimes)
{
for (int i =3D cat; i < NumOfTimes; i++)
{
// do something
std::cout << "did something " << i + 1 << " times\n";
}
};
int main()
{
unsigned short int whichAnimal;
std::cout << "Enter a number between "=20
<< cat << " and " << mule << ": ";
std::cin >> whichAnimal;
std::cout << "Hey! It's a";
switch (whichAnimal)
{
case cat : std::cout << " cat!\n";
DoItNow(cat); // do it once
break;
case dog : std::cout << " dog!\n";
DoItNow(dog); // do it twice
break;
case horse : std::cout << " horse!\n";
DoItNow(horse); // do it seven times
break;
case rabbit : std::cout << " rabbit!\n";
DoItNow(rabbit); // do it three times
break;
case pig : std::cout << " pig!\n";
DoItNow(pig); // do it four times
break;
case cow : std::cout << " cow!\n";
DoItNow(cow); // do it five times
break;
case mule : std::cout << " mule!\n";
DoItNow(mule); // do it 30 times
break;
default:
std::cout << "n unidentified animal!\n"; // fall through
}
=20
system("pause");
return 0;
}
To me, it is much easier to see that the programmer wants an activity to =
take place seven times if the value is horse than using whichAnimal in =
the for loop above. Obviously the code is not as tight, but it is =
certainly more transparent which is a good thing.=20
Regards,
Bob
|
|
From: Ioannis V. <no...@ho...> - 2002-04-20 21:29:09
|
I had sent a reply with screenshots to Bob Wilson's email concerning MINGW, but it never arrived at me through the list (perhaps the list doesn't allow attachments of some size). Anyway the summary is: MINGW which is GCC port for Windows is very highly ANSI/ISO standards conformant, more than many commercial compilers. Also GCC is highly professional with myriad optimisation options. You can set anything through additional switches in Dev-C++ Compiler options. For strict ANSI/ISO C/C++ conformance place the options: -ansi -pedantic To see all the available compiler switches, and assuming Dev-C++ to be installed in c:\dev-c++, give the following command from the command prompt: \dev-c++\bin\g++ -v --help |more and add the switches you like in Dev-C++. The default switches accompanied with -ansi -pedantic for strict ANSI conformance should be enough for most cases though. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ho...> - 2002-04-20 21:03:39
|
Yes using the keyword static. E.g.
void something(void)
{
static int x;
/* ... */
}
x keeps its value between function calls and is created only once. This
type of coding is not suitable for concurrent applications
(multithreading).
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of David McKen
> Sent: Saturday, April 20, 2002 11:41 PM
> To: Dev-C Mailing List
> Subject: [Dev-C++] Global to local variables
>
>
> I have global varibles in my program that are used by one function
> to keep track of it's state. Is there a way to have a local varible
> to keep it's value between calls?
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Games - play chess, backgammon, pool and more
> http://games.yahoo.com/
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: <ab...@gm...> - 2002-04-20 20:41:32
|
can anyone give an example thanks |
|
From: David M. <ci...@ya...> - 2002-04-20 20:41:32
|
I have global varibles in my program that are used by one function to keep track of it's state. Is there a way to have a local varible to keep it's value between calls? __________________________________________________ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ |
|
From: Ioannis V. <no...@ho...> - 2002-04-20 17:57:55
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Daniel Glenfield > Sent: Thursday, April 18, 2002 7:13 PM > To: dev...@li... > Subject: [Dev-C++] Global variables (linking errors) > > > Help me out here would you? I have three C++ source files, > each with its own > header file. I want to have a global variable that all three > source files > can use. You must place the global variable in your main source file only. At the other files use the keyword extern. E.g. extern int x; Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Jason H. <jas...@bt...> - 2002-04-20 17:56:47
|
Message
----- Original Message -----=20
From: Ioannis Vranos=20
To: Dev-C++=20
Sent: Saturday, April 20, 2002 6:28 PM
Subject: RE: [Dev-C++] Dev-C++ Users Beware!
Another point is that the developers of Dev-C++ and the developers =
MinGW cannot be responsible when the compiler doesn't work in exactly =
the way you expect. =20
I did not understand what you mean by that.
I have noticed that people in the past have posted what they believe to =
be issues with the compiler here in the expectation that the Dev-C++ =
community can fix compiler bugs. I decided that some people don't quite =
understand the relationship between IDE and compiler. What I was trying =
to say in a way was that if the problem is one of ANSI compliance in the =
compiler then the people responsible for that end of the system are the =
developers of GCC. Admittedly there can be occasions where the source of =
a problem is Dev-C++ or MinGW.
When I find a problem I try to narrow it down as much as possible, or =
even locate the source of it, before talking to anyone about it.
Jason.
|
|
From: Ioannis V. <no...@ho...> - 2002-04-20 17:47:47
|
Yes, the pause argument is system depedent, but the system() function
can be found to any system. You simply change "pause" to the correct
command of any system. I would do the following:
// system extension encapsulated under a portable interface
void pause()
{
system("pause");
// or sleep() or whatever
}
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
<http://www.noicys.cjb.net/>
* Alternative URL: http://run.to/noicys
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Bob
Wilson
Sent: Thursday, April 18, 2002 4:08 PM
To: Dev-C++ User Mailing List
Subject: Re: [Dev-C++] enum
I've been think about this, and isn't the call to system("pause"); a
windows specific call and as such would not be portable to UNIX or any
other operating system?
Regards,
Bob
A more ANSI C++ compliant code would be:
#include <iostream>
#include <cstdlib>
int main ()
{
using std::cout;
using std::endl;
using std::system;
enum {Dog,Cat,Horse,Pig};
int i;
for (i = Dog; i <= Pig; i++)
cout << "i = " << i << endl;
system("pause");
return 0;
}
or check the comments i have placed in your code.
Ioannis
|
|
From: Andres R. <lo...@ho...> - 2002-04-20 17:40:39
|
Hello! =20 You are right. =96ansi does not generate any warnings. I useed it with =96pedantic option. I used MSYS and MinGW (latest, see below) >gcc -v gcc version 2.95.3-6 (mingw special) =20 I noticed that MinGW that ships with Dev-C++ 4.0(1) is slightly older. >gcc =96v gcc version 2.95.2 19991024 (release) =20 I tried it with Dev-C++ 4.1 and =84original=93 compiler. I got worning I mentioned. I tried it on command line and it =84worked=93 fine also. =20 Try playing around if you really want to see a little warning message ;) =20 Andres. =20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Bob Wilson Sent: Saturday, April 20, 2002 7:12 PM To: Dev-C++ User Mailing List Subject: Re: [Dev-C++] Dev-C++ Users Beware! =20 Andres, =20 If it is GNUC extension, that greatly relieves my concern, however none of the compiler switches you mention generate any warnings. I tried them individually and in combination in both the compiler options and the project options. It is possible that the Bloodshed IDE is not passing the switches properly to the compiler, but I doubt it.=20 =20 Regards, =20 Bob -Yes. Variable sized arrays are GNUC extension. =20 If you use =96ansi or =96pedantic switches on commandline, you get only warning: =20 test.cpp: In function `int main()': test.cpp:12: warning: ANSI C++ forbids variable-size array `myArray' =20 |
|
From: Ioannis V. <no...@ho...> - 2002-04-20 17:29:25
|
<http://run.to/noicys> -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Jason Hardman Sent: Saturday, April 20, 2002 1:36 AM To: Dev-C++ Subject: Re: [Dev-C++] Dev-C++ Users Beware! Something people using Dev-C++ may not realise is that the supplied compiler is MinGW and that it is a port of the GCC compilers as used on linux and many other unix based OS's. The version of GCC that MinGW supplies is 2.?? (I can't remember the exact number) which is fairly old now, as the current linux version of GCC is 3.??. GCC 3.x is fairly new. In fact Suse Linux 7.3 that i have uses GCC 2.x as the default compiler. The latest version of MINGW is pretty good. The current MinGW version is not 100% standards compliant because of this, Noone is yet. In fact MINGW is one of the most compliant compilers i have ever seen, more compliant than Visual C++ 7 .NET for example. and I believe also that the developers of GCC made several additions to it for use within Linux (or Unix?). Yes, but the MINGW team has added Win32 API support. I don't know all the details, so maybe someone with a bit more knowledge can fill in the gaps, but it is well worth considering if you are on the hunt for perfect ANSI compliant C++. Yes we all are. Another point is that the developers of Dev-C++ and the developers MinGW cannot be responsible when the compiler doesn't work in exactly the way you expect. I did not understand what you mean by that. On the brightside, you are getting a free, open-source, cross-platform and non-proprietory compiler. The source for the latest GCC versions is freely available, but AFAIK no one has yet managed to produce a successful port of it to the windows environment. You are welcome to try. As far as i know MING 3.x is currently being made. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys |