|
From: <Har...@ne...> - 2003-05-03 05:13:37
|
dev...@li... wrote: >Send Dev-cpp-users mailing list submissions to > dev...@li... > >To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/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: C and C++ sintax restrictions in Dev-C++ (Ioannis Vranos) > 2. Re: two-dimensional arrays (Daniel Glenfield) > >--__--__-- > >Message: 1 >From: "Ioannis Vranos" <iv...@at...> >To: "Dev-C++ Mailing List" <dev...@li...> >Date: Sun, 27 Apr 2003 03:19:38 +0300 >Subject: RE: [Dev-C++] C and C++ sintax restrictions in Dev-C++ > >> -----Original Message----- >> From: dev...@li... >> [mailto:dev...@li...] On Behalf >> Of Andrι Macαrio Barros >> Sent: Saturday, April 26, 2003 8:54 PM >> To: Dev-Cpp-Users >> Subject: [Dev-C++] C and C++ sintax restrictions in Dev-C++ >> >> >> Dear Users, >> >> ---> Some students are using a mix of commands and features like: >> /* and // >> getchar() and cin.get() >> <stdio.h> and <iostream> >> <stdlib.h> and <cstdlib> >> printf and cout >> scanf and cin >> .c and .cpp >> >> "A"---> I´ve tried some enable/disabe options inside >> "Options->Compiler Options->C/C++ Compiler", >> but couldn´t >> inhibt the students to write codes mixing the commands. > > >Of course you couldn't since they belong to the C subset of C++ (that is >they are valid C++). > > > >> The corrections are still by hand. Sometimes is >> difficult >> to explain for some guys that come with vicious >> what a C or >> a C++ program is. >> >> ---> My Questions: >> 1) Is my attempt to convince them correct? > > >If you say to them that printf() is not C++ then you are wrong. What you >must say is that C++ provides newer facilities which are superior >alternatives. > > > >> 2) If it is, is there any set of options that allows me to >> inhibt to mix >> C and C++ features? > > >No because it is C++. You haven't any mixture of the 2 languages. Personally >I wouldn't mark it as wrong since it is not. > > > > > >Ioannis Vranos > >* Programming pages: http://www.noicys.freeurl.com >* Alternative URL 1: http://run.to/noicys >* Alternative URL 2: http://www.noicys.cjb.net > > >Anti-racism movement: http://www.positive-youthfoundation.org >Iraq Peace Pledge: http://www.peacepledge.org > > > > >--__--__-- > >Message: 2 >From: "Daniel Glenfield" <sp...@ho...> >To: pio...@wp..., dev...@li... >Subject: Re: [Dev-C++] two-dimensional arrays >Date: Sun, 27 Apr 2003 01:58:32 +0100 > >Try two nested for loops, like > >for (condition relating to [x][]) > > // then > for (condition relating to second dimension [][x]) > >So you end up with >[0][0] to [0][9] (or whatever) then you come out of the inner for loop. Then >control goes to the outer loop and then goes back into the second to do >[1][0] to [1][9] > > > > >>From: Piotrus Student <pio...@wp...> >>Reply-To: Piotrus Student <pio...@wp...> >>To: dev...@li... >>Subject: [Dev-C++] two-dimensional arrays >>Date: Sun, 27 Apr 2003 01:40:40 +0200 >> >>Hello >> >>Could somebody help me to solve the following problem? >>I have to swap two two-dimensional arrays. I wouldn't like to do it in >>this way: >> >>... >>double vec_1[N][M],vec_2[N][M],temp; >>int i,j; >>... >>for(i=0;i<N;i++) >> for(j=0;j<M;j++) >> { >> temp=vec_1[i][j]; >> vec_1[i][j]=vec_2[i][j]; >> vec_2[i][j]=temp; >> } >>... >> >> >>Thanks for advance. Peter. >> >> >> >> >>------------------------------------------------------- >>This sf.net email is sponsored by:ThinkGeek >>Welcome to geek heaven. >>http://thinkgeek.com/sf >>_______________________________________________ >>Dev-cpp-users mailing list >>Dev...@li... >>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >_________________________________________________________________ >Overloaded with spam? With MSN 8, you can filter it out >http://join.msn.com/?page=features/junkmail&pgmarket=en-gb&XAPID=32&DI=1059 > > > > >--__--__-- > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >End of Dev-cpp-users Digest > __________________________________________________________________ Try AOL and get 1045 hours FREE for 45 days! http://free.aol.com/tryaolfree/index.adp?375380 Get AOL Instant Messenger 5.1 for FREE! Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 |