[Dev-C++] Re: Dev-cpp-users digest, Vol 1 #41 - 5 msgs
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
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 |