Re: [Dev-C++] differnece between system pause and cin.get()
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2003-02-17 22:24:58
|
-------Original Message-------=0D =0D From: Catsquotl=0D Date: =C4=E5=F5=F4=DD=F1=E1, 17 =D6=E5=E2=F1=EF=F5=DC=F1=E9=EF=F2 2003 2:= 21:19 =EC=EC=0D To: dev...@li...=0D Subject: [Dev-C++] differnece between system pause and cin.get()=0D =0D Hello,=0D =0D Obviously there are quite a lot of differences between the two.=0D However since I am new to c++ and pragramming all together i was wonderin= g =0D why cin.get()=0D works sometimes to pauze the system after a programm and sometimes it won= `t.=0D =0D =3D=3D> Because one or more '\n' has remain in the stream from previous c= in use(s).=0D =0D =0D It seems to me that cin.get() before return 0;=0D would use less memory than system pause.=0D =0D =3D=3D> It depends on how many things are written inside get(). However t= he member function call is usually faster than a regular function call. But = i do not think you should be so space/time concerned. :)=0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |