dev-cpp-users Mailing List for Dev-C++ (Page 757)
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: Jurrie O. <ju...@tr...> - 2000-11-13 17:52:44
|
Hi, I've got some code of programs who are programmed in Visual C++ 6.0 or = Djgpp. The packages include makefiles, but I seem to be unable to open = those in Dev C++. Is there a way to do this? Greetz -- Jurrie ju...@tr... |
From: Ioannis V. <no...@ya...> - 2000-11-13 15:13:28
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of Jon Keim > Sent: Monday, November 13, 2000 11:39 AM > To: Dev...@li... > Subject: [Dev-C++] character buffering with getch() and gets() > > > problem 1: > I'm developing a piddly little program from a learning book, and in my > main(), I've got a statement to get the user's choice from a menu > that looks > like this: > > choice = getche(); > > it takes the '1' character required and successfully activates a > particular function. Once inside the function, however, I have this input > statement, to prompt for and get some data for the string "title" in a > struct array. > > printf( "Book title : " ); > gets( catalog[ recordCount ].title ); > > Simple, right? Nope. The prompt comes up > > Book title : 1 > > the gets() reads the 1 from the getche() up in the main function... I > have tried all sorts of odd things, placing getch()'s and getche()'s > after/before statements to clear the buffer, substituted a scanf( "%s", getch(), getche() are not standard C/C++ functions. Better use getchar() or getc(stdin) in the following style: choice=getchar(); getchar(); getchar() is equivalent of getc(stdin) so use whatever one you like. The second getchar() is used to clear '\n' (the enter) from the stdin. > foo ) for the gets(). Even tried testing to see if there was something in > the buffer with kbhit(), and that comes up negative. Any idea why this is > happening? Implement my above suggestion. > --------------------------------------------------------------------- > > problem 2: > any idea how to limit an inputted string to 80 characters and still be > able to read spaces? I tried the following in my above program and it > screwed things up FAR worse... > > scanf( "%80[^\n]", string ); One way is fgets(): fgets(string, 80, stdin); It reads 79 characters, and places '\0' at the end. Ioannis _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Ioannis V. <no...@ya...> - 2000-11-13 14:50:42
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > VILAYA TOURS > Sent: Monday, November 13, 2000 3:20 AM > To: dev...@li... > Subject: [Dev-C++] Starting out > > > I am just starting out with C++. I have the Oleg Yaroshenko "The > Beginner's Guide to C++" and I am trying the first example. I am > using the > Dev-C++ 3.9. Problem is that the small program of: > > #include <iostream.h> > > void main() int main() > { > cout <<"Hello"; > } > > flashes up and is gone straight away. I have tried making the adjustmants > reccommended in the help and various other ideas but to no avail. I know > this is simple, but what is the answer. Also which mode should I be > working in for the Oleg's book - cosole, MSDos, Windows, Empty??? Open a command prompt window, enter in the directory of your program using cd /directory and run the executable from there. I think an autopause routine must be implemented in the execute option of Dev--C++. I had sent one written in C to Colin in the past. Colin, i think you should include one in next version of Dev-C++ (Visual C++ has the same feature too). :) Another way is to #include <cstdlib> or #include <stdlib.h> and use the system("pause") command, or use getchar() or cin.get() or something else. Ioannis _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Jon K. <rc...@cr...> - 2000-11-13 09:39:09
|
problem 1: I'm developing a piddly little program from a learning book, and in my main(), I've got a statement to get the user's choice from a menu that looks like this: choice = getche(); it takes the '1' character required and successfully activates a particular function. Once inside the function, however, I have this input statement, to prompt for and get some data for the string "title" in a struct array. printf( "Book title : " ); gets( catalog[ recordCount ].title ); Simple, right? Nope. The prompt comes up Book title : 1 the gets() reads the 1 from the getche() up in the main function... I have tried all sorts of odd things, placing getch()'s and getche()'s after/before statements to clear the buffer, substituted a scanf( "%s", foo ) for the gets(). Even tried testing to see if there was something in the buffer with kbhit(), and that comes up negative. Any idea why this is happening? --------------------------------------------------------------------- problem 2: any idea how to limit an inputted string to 80 characters and still be able to read spaces? I tried the following in my above program and it screwed things up FAR worse... scanf( "%80[^\n]", string ); I assume it didn't work because scanf left the '\n' in the buffer or something like that... Any help is greatly appreciated -- Jon --------------------------------- |\ | | \|ightshade -|--- email: nsh...@cr... website: http://www.crosswinds.net/~nshadez17/ ________________________________________________________ 1stUp.com - Free the Web Get your free Internet access at http://www.1stUp.com |
From: <jor...@wa...> - 2000-11-13 05:33:22
|
Intenta tambiem añadir, como ultima linea , system("pause"); . Hazlo antes de la ultima llave de cierre ----- Original Message ----- From: "VILAYA TOURS" <vil...@am...> To: <dev...@li...> Sent: Monday, November 13, 2000 2:19 AM Subject: [Dev-C++] Starting out > I am just starting out with C++. I have the Oleg Yaroshenko "The > Beginner's Guide to C++" and I am trying the first example. I am using the > Dev-C++ 3.9. Problem is that the small program of: > > #include <iostream.h> > > void main() > { > cout <<"Hello"; > } > > flashes up and is gone straight away. I have tried making the adjustmants > reccommended in the help and various other ideas but to no avail. I know > this is simple, but what is the answer. Also which mode should I be > working in for the Oleg's book - cosole, MSDos, Windows, Empty??? > > Thanks > > Rob > Vilaya Tours > c/o Gran Hotel Vilaya > Jr. Grau 624 > Chachapoyas > Peru > > Tel: 044 777506 > Fax: 044 778154 > Email: vil...@wa... > www.vilayatours.com > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: lstar36 <ls...@fl...> - 2000-11-13 02:34:11
|
----- Original Message ----- From: "VILAYA TOURS" <vil...@am...> To: <dev...@li...> Sent: Sunday, November 12, 2000 7:19 PM Subject: [Dev-C++] Starting out > I am just starting out with C++. I have the Oleg Yaroshenko "The > Beginner's Guide to C++" and I am trying the first example. I am using the > Dev-C++ 3.9. Problem is that the small program of: > > #include <iostream.h> > > void main() > { > cout <<"Hello"; getch(); // this will stop the screen untill you hit a key > } > > flashes up and is gone straight away. I have tried making the adjustmants > reccommended in the help and various other ideas but to no avail. I know > this is simple, but what is the answer. Also which mode should I be > working in for the Oleg's book - cosole, MSDos, Windows, Empty??? > > Thanks > > Rob > Vilaya Tours > c/o Gran Hotel Vilaya > Jr. Grau 624 > Chachapoyas > Peru > > Tel: 044 777506 > Fax: 044 778154 > Email: vil...@wa... > www.vilayatours.com > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: VILAYA T. <vil...@am...> - 2000-11-13 01:20:29
|
I am just starting out with C++. I have the Oleg Yaroshenko "The Beginner's Guide to C++" and I am trying the first example. I am using the Dev-C++ 3.9. Problem is that the small program of: #include <iostream.h> void main() { cout <<"Hello"; } flashes up and is gone straight away. I have tried making the adjustmants reccommended in the help and various other ideas but to no avail. I know this is simple, but what is the answer. Also which mode should I be working in for the Oleg's book - cosole, MSDos, Windows, Empty??? Thanks Rob Vilaya Tours c/o Gran Hotel Vilaya Jr. Grau 624 Chachapoyas Peru Tel: 044 777506 Fax: 044 778154 Email: vil...@wa... www.vilayatours.com |
From: lstar36 <ls...@fl...> - 2000-11-12 03:04:09
|
Stdin functions are base on the ANSI code. You have done the correct thing to write a conversion function to change to scandinavian. ----- Original Message ----- From: "Anders Nilsson" <a.n...@de...> To: <dev...@li...> Sent: Saturday, November 11, 2000 8:57 AM Subject: [Dev-C++] National character sets > Hi! > > How can I change to another character set? When I use cout to write scandinavian characters they are replaced by other characters. Now I use this function but there must be a better way. > > int ConvertToExtendANSI(int kod) > { > if (kod == -59) > return (143); > if (kod == -60) > return (142); > if (kod == -42) > return (153); > return (kod); > } > > Thanks for many interesting questions and answers in this mailing list! > > Anders > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: lstar36 <ls...@fl...> - 2000-11-12 02:54:03
|
The function getchar() is a macro which leaves a char in the buffer so = the second time throught the while loop you get the error print. Use = getche(). Also it is better programming to conver the keyboard input = to an upper or lower case with the function toupper() and then use only = a single case. Also use a do{ while()} loop to make the program easier = for someone else to understand. example: #include <ctype.h> #include <conio.h> #include <stdlib.h> #include <stdio.h> int main() { int grade; int aCount =3D 0, bCount =3D 0; printf("Enter the letter grades.\n"); printf("Enter the letter x to end input.\n"); do { grade =3D toupper(getche()); switch(grade) { case 'A': ++aCount; break; case 'B': ++bCount; break; case 'X': printf("\nend of input\n"); break; default: printf("\nIncorrect letter grade entered.\n"); printf("Enter a new grade.\n"); break; } } while (grade !=3D 'X'); printf("%d\n", aCount); printf("%d\n", bCount); system("PAUSE"); return 0; }----- Original Message -----=20 From: Saundra Schwarz=20 To: dev...@li...=20 Sent: Saturday, November 11, 2000 12:01 PM Subject: [Dev-C++] switch statement Hi, I've been having difficulty getting my switch statements to work = properly. When I run the program no matter what I enter I get the = default response. Please help. I've inculded a sample from my text. I = need the switch statement to work for an assignment. #include <stdlib.h> int main() { int grade; int aCount =3D 0, bCount =3D 0; printf("Enter the letter grades.\n"); printf("Enter the -1 to end input.\n"); while( (grade =3D getchar()) !=3D -1) { switch(grade) { case 'a': case 'A': ++aCount; break; case 'b': case 'B': ++bCount; break; default: printf("Incorrect letter grade entered."); printf("Enter a new grade.\n"); break; } } printf("%d\n", aCount); printf("%d\n", bCount); system("PAUSE"); return 0; } |
From: Ioannis V. <no...@ya...> - 2000-11-11 18:32:26
|
At first, you did not include <stdio.h>. Second, the ==-1 also does not work since getchar reads a character a time and the -1 of the user input is not read together. Now the most important, the program reads the character, the error message is for the '\n' character which the next getchar() reads after your input. So take a look at the improved code: #include <stdio.h> /* You forgot it */ #include <stdlib.h> int main() { int grade; int aCount = 0, bCount = 0; printf("Enter the letter grades.\n"); printf("Enter the Q to end input.\n"); while( (grade = getchar()) != 'Q') /* 'Q' instead of '-' '1' */ { getchar(); /* It absorbs the next '\n' */ switch(grade) { case 'a': case 'A': ++aCount; break; case 'b': case 'B': ++bCount; break; default: printf("Incorrect letter grade entered."); printf("Enter a new grade.\n"); break; } } printf("%d\n", aCount); printf("%d\n", bCount); system("PAUSE"); return 0; } |
From: Saundra S. <Sch...@ho...> - 2000-11-11 15:01:42
|
Hi, I've been having difficulty getting my switch statements to work = properly. When I run the program no matter what I enter I get the = default response. Please help. I've inculded a sample from my text. I = need the switch statement to work for an assignment. #include <stdlib.h> int main() { int grade; int aCount =3D 0, bCount =3D 0; printf("Enter the letter grades.\n"); printf("Enter the -1 to end input.\n"); while( (grade =3D getchar()) !=3D -1) { switch(grade) { case 'a': case 'A': ++aCount; break; case 'b': case 'B': ++bCount; break; default: printf("Incorrect letter grade entered."); printf("Enter a new grade.\n"); break; } } printf("%d\n", aCount); printf("%d\n", bCount); system("PAUSE"); return 0; } |
From: Anders N. <a.n...@de...> - 2000-11-11 14:55:51
|
Hi! How can I change to another character set? When I use cout to write scandinavian characters they are replaced by other characters. Now I use this function but there must be a better way. int ConvertToExtendANSI(int kod) { if (kod == -59) return (143); if (kod == -60) return (142); if (kod == -42) return (153); return (kod); } Thanks for many interesting questions and answers in this mailing list! Anders |
From: lstar36 <ls...@fl...> - 2000-11-11 14:10:26
|
Corrected input: Sorry , in the first submission I forgot to put the "+" in the fopen statement. This allows both read & write. #include <stdio.h> #include <string.h> #include <stdlib.h> FILE *frw; void main(void); void main(void) { char save[51]; if ( (frw = fopen("fname.txt", "r+")) == NULL){ puts("Can not open winning database"); exit(0); } strcpy(save, "Hello World"); fwrite(save, sizeof(save), 1, frw); } ----- Original Message ----- From: "Shiva Kissoon" <sti...@ho...> To: <dev...@li...> Sent: Friday, November 10, 2000 6:48 PM Subject: [Dev-C++] (no subject) > hi, > i want to know how do i output to a text file > thanx > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: lstar36 <ls...@fl...> - 2000-11-11 13:19:34
|
Here is a sample of one way towrite to a text file . There areseveral other ways. See your documentation. #include <stdio.h> #include <string.h> #include <stdlib.h> FILE *frw; void main(void); void main(void) { char save[51]; if ( (frw = fopen("fname.txt", "r")) == NULL){ puts("Can not open winning database"); exit(0); } strcpy(save, "Hello World"); fwrite(save, sizeof(save), 1, frw); } ----- Original Message ----- From: "Shiva Kissoon" <sti...@ho...> To: <dev...@li...> Sent: Friday, November 10, 2000 6:48 PM Subject: [Dev-C++] (no subject) > hi, > i want to know how do i output to a text file > thanx > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: Shiva K. <sti...@ho...> - 2000-11-11 04:48:07
|
hi, i want to know how do i output to a text file thanx _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. |
From: S.D. C. <why...@sp...> - 2000-11-11 00:12:09
|
I have a project that I've been developing in VC6. It's a Win32 api project with no proprietary VC6 code or macros or MFC or anything. When I compile and execute it in VC6 it works fine, but when I move the source files to DEV-C++ I get compile errors from some of the API calls. Any suggestions as to what's wrong? Thanks for the help. Sean Campbell |
From: Miquel M. <miq...@wa...> - 2000-11-10 00:10:52
|
hi, i've downloaded dev-c++ 4 and i'm unable to set the editor color attributes (i'd like comments normal font, not bold) TIA. Miquel Matas(Barcelona(Spain)). |
From: Ioannis V. <no...@ya...> - 2000-11-09 11:51:54
|
Not in ANSI C++. In ANSI C++ it must be #include <iostream>. Before the official standard time it was #include <iostream.h>. -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Derek Sent: Thursday, November 09, 2000 3:06 AM To: dev...@li... Subject: [Dev-C++] Re: Dev-cpp-users digest, Vol 1 #41 - 5 msgs because you need the header file <iostream.h> you had no h!!!!!!! |
From: Derek <mp...@ma...> - 2000-11-08 22:11:09
|
because you need the header file <iostream.h> you had no h!!!!!!! At 01:15 PM 11/8/00 -0800, you wrote: >Send Dev-cpp-users mailing list submissions to > dev...@li... > >To subscribe or unsubscribe via the World Wide Web, visit > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users >or, via email, send a message with subject or body 'help' to > dev...@li... > >You can reach the person managing the list at > dev...@li... > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of Dev-cpp-users digest..." > > >Today's Topics: > > 1. Re: Returning an array (Vesa Norilo) > 2. Re: Dev-cpp-users digest, Vol 1 #40 - 6 msgs=20 > (=3D?iso-8859-1?Q?H=3DE5kan_Waara?=3D) > 3. RE:is OK (Ramin Dara) > 4. RE: namespace std? (Ioannis Vranos) > 5. Re: namespace std? (Nick) > >--__--__-- > >Message: 1 >Date: Tue, 07 Nov 2000 22:16:18 +0200 >From: Vesa Norilo <wa...@dl...> >To: dev...@li... >Subject: Re: [Dev-C++] Returning an array >Reply-To: dev...@li... > > > Does anyone know how a function can return an array? > >You should preferably code so that the function receives pointer to that >array as a parameter. Or the function might return a pointer if it >creates a new array from scratch. > >-Vesa > >--__--__-- > >Message: 2 >From: =3D?iso-8859-1?Q?H=3DE5kan_Waara?=3D <hw...@ch...> >To: <dev...@li...> >Date: Tue, 7 Nov 2000 22:47:35 +0100 >charset=3D"iso-8859-1" >Subject: [Dev-C++] Re: Dev-cpp-users digest, Vol 1 #40 - 6 msgs >Reply-To: dev...@li... > > > Does anyone know how a function can return an array? > > >Well.. An array is basically just a pointer to a bunch of other pointers or >variables/objects. So you would just pass a pointer to the array, and then >dereference it to access it. > >Hth, > >-- >H=E5kan Waara > > > > >--__--__-- > >Message: 3 >From: "Ramin Dara" <rd...@gm...> >To: <dev...@li...> >Date: Wed, 8 Nov 2000 01:40:46 +0100 >boundary=3D"----=3D_NextPart_000_0015_01C04924.EA941F00" >Subject: [Dev-C++] RE:is OK >Reply-To: dev...@li... > >This is a multi-part message in MIME format. > >------=3D_NextPart_000_0015_01C04924.EA941F00 >Content-Type: text/plain; > charset=3D"iso-8859-1" >Content-Transfer-Encoding: quoted-printable > > > >------=3D_NextPart_000_0015_01C04924.EA941F00 >Content-Type: text/html; > charset=3D"iso-8859-1" >Content-Transfer-Encoding: quoted-printable > ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > > >------=3D_NextPart_000_0015_01C04924.EA941F00-- > > >--__--__-- > >Message: 4 >From: "Ioannis Vranos" <no...@ya...> >To: <dev...@li...> >Subject: RE: [Dev-C++] namespace std? >Date: Wed, 8 Nov 2000 14:52:48 +0200 >boundary=3D"----=3D_NextPart_000_0008_01C04993.8F6C1820" >Reply-To: dev...@li... > >This is a multi-part message in MIME format. > >------=3D_NextPart_000_0008_01C04993.8F6C1820 >Content-Type: text/plain; > charset=3D"iso-8859-1" >Content-Transfer-Encoding: 7bit > >If you want your programs to be portable, you should use std::cout<<"Hello >World!\n"; > -----Original Message----- > From: dev...@li... >[mailto:dev...@li...]On Behalf Of Chris Bunney > Sent: Tuesday, November 07, 2000 8:45 PM > To: dev-c++ > Subject: [Dev-C++] namespace std? > > > Hi everyone, > > Just a quick question that has been bugging me! > > I if compile the program: > > #include <iostream> > > int main() > { > cout << "Hello World!\n"; > return 0; > } > > It works perfectly! But surely it should fail because I have used the= new >style header files that are placed in namespace std. Being as I have not >added 'using namespace std;' to my program - why does it work?! I though= you >had to qualify each function with std:: > > Im sure there is a good reason for this - Im just interested! > > Chris > >------=3D_NextPart_000_0008_01C04993.8F6C1820 >Content-Type: text/html; > charset=3D"iso-8859-1" >Content-Transfer-Encoding: quoted-printable > ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> >If you want your programs to be portable, you should =3D use=3D20=20 >std::cout<<"Hello World!\n"; >-----Original Message----- >From:=3D20 dev...@li...=3D20=20 >[mailto:dev...@li...]On Behalf Of =3D Chris=3D= 20=20 >Bunney >Sent: Tuesday, November 07, 2000 8:45 =3D PM >To:=3D20 dev-c++ >Subject: [Dev-C++] namespace =3D std? > >Hi everyone, > >Just a quick question that has been bugging =3D me! > >I if compile the program: > >#include <iostream> > >int main() >{ > cout << "Hello=3D20 World!\n"; > return 0; >} > >It works perfectly! But surely it should fail =3D because I have=3D20 used= the=20 >new style header files that are placed in namespace std. =3D Being as I=3D2= 0=20 >have not added 'using namespace std;' to my program - why does it =3D= work?!=20 >I=3D20 though you had to qualify each function with std:: > >Im sure there is a good reason for this - Im just=3D20 interested! > >Chris > > >------=3D_NextPart_000_0008_01C04993.8F6C1820-- > > >__________________________________________________ >Do You Yahoo!? >Talk to your friends online with Yahoo! Messenger. >http://im.yahoo.com > > >--__--__-- > >Message: 5 >From: "Nick" <en...@ho...> >To: dev...@li... >Date: Wed, 8 Nov 2000 13:50:48 -0600 >Subject: Re: [Dev-C++] namespace std? >Reply-To: dev...@li... > >Hello Chris, > > > > Just a quick question that has been bugging me! > > > > I if compile the program: > > > > #include <iostream> > > > > int main() > > { > > cout << "Hello World!\n"; > > return 0; > > } > > > > It works perfectly! But surely it should fail because I have used the > > new style header files that are placed in namespace std. Being as I > > have not added 'using namespace std;' to my program - why does it > > work?! I though you had to qualify each function with std:: > > > > Im sure there is a good reason for this - Im just interested! > > >The short answer for this is "legacy code." Without going into too >much detail, and ultimately leaving something out, here is a link to >a number of pages and discussions on this: > >http://www.google.com/search?q=3D%22-fhonor-std%22 > >The compiler option is "-fhonor-std" but in order for it to work >correctly, your library must have been built with this flag. > >regards, > >Nick > > >--__--__-- > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > >End of Dev-cpp-users Digest_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
From: Nick <en...@ho...> - 2000-11-08 19:53:31
|
Hello Chris, > Just a quick question that has been bugging me! > > I if compile the program: > > #include <iostream> > > int main() > { > cout << "Hello World!\n"; > return 0; > } > > It works perfectly! But surely it should fail because I have used the > new style header files that are placed in namespace std. Being as I > have not added 'using namespace std;' to my program - why does it > work?! I though you had to qualify each function with std:: > > Im sure there is a good reason for this - Im just interested! > The short answer for this is "legacy code." Without going into too much detail, and ultimately leaving something out, here is a link to a number of pages and discussions on this: http://www.google.com/search?q=%22-fhonor-std%22 The compiler option is "-fhonor-std" but in order for it to work correctly, your library must have been built with this flag. regards, Nick |
From: Ioannis V. <no...@ya...> - 2000-11-08 12:51:57
|
If you want your programs to be portable, you should use std::cout<<"Hello World!\n"; -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Chris Bunney Sent: Tuesday, November 07, 2000 8:45 PM To: dev-c++ Subject: [Dev-C++] namespace std? Hi everyone, Just a quick question that has been bugging me! I if compile the program: #include <iostream> int main() { cout << "Hello World!\n"; return 0; } It works perfectly! But surely it should fail because I have used the new style header files that are placed in namespace std. Being as I have not added 'using namespace std;' to my program - why does it work?! I though you had to qualify each function with std:: Im sure there is a good reason for this - Im just interested! Chris |
From: Ramin D. <rd...@gm...> - 2000-11-08 00:45:24
|
From: <hw...@ch...> - 2000-11-07 21:51:16
|
> Does anyone know how a function can return an array? Well.. An array is basically just a pointer to a bunch of other pointers or variables/objects. So you would just pass a pointer to the array, and then dereference it to access it. Hth, -- Håkan Waara |
From: Vesa N. <wa...@dl...> - 2000-11-07 20:20:16
|
> Does anyone know how a function can return an array? You should preferably code so that the function receives pointer to that array as a parameter. Or the function might return a pointer if it creates a new array from scratch. -Vesa |
From: Jose G. <jo...@iq...> - 2000-11-07 19:54:37
|
Does anyone know how a function can return an array? Jose Guevarra |