dev-cpp-users Mailing List for Dev-C++ (Page 655)
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: Ioannis V. <no...@ya...> - 2001-10-23 08:41:46
|
> -----Original Message----- > From: Luigi Santillo [mailto:gi...@li...]=20 > Sent: Monday, October 22, 2001 8:07 PM > To: Ioannis Vranos > Subject: RE: [Dev-C++] possible bug of MinGW compiler >=20 > Ok, It is clear now. I did not check for the '\n' because I=20 > did not want=20 > the program to print output on a line basis, but I wanted=20 > only one final=20 > count, even when input comes from the keyboard. You can look for a double '\n', i mean press enter twice, or a special combination of characters. > >You can even check argc and argv to see if you provided any argument=20 > >with > >'<' and it to assume automatically that you have redirected=20 > input, so when=20 > >it finds '<' to use EOF, when it doesn't find any '<' to use '\n'. >=20 > ?? ... now I'm a bit confused :-). >=20 > I have always thought that redirection has to do with the=20 > shell, in other=20 > words, a program has no way to detect if stdin is the console=20 > or if it has=20 > been redirected. In fact the following code: Yes, you are right, i checked it and it doesn't work. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ya...> - 2001-10-23 08:36:53
|
Finally i agree with you. You are right, every member function has only one instance. I understood it indirectly, from the way pointers to member functions work. Well although i thought i know much about C++, probably there are details i miss. :) =20 =20 =20 Ioannis =20 * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com <http://www.noicys.f2s.com/>=20 * Alternative URL: http://run.to/noicys =20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Jason Hardman Sent: Tuesday, October 23, 2001 5:32 AM To: Dev-C++ Subject: Re: [Dev-C++] Strange effect I'm glad someone else agrees with me. :) =20 Now onto the static issue, "In C++, when static is used on a class *data* member, it causes only one copy of that member to be shared by all objects of its class", (C/C++ Programmer's Reference, second edition - Herbert Schildt). =20 "Member functions may also be declared as static. There are several restrictions placed on static member functions. They may only directly refer to other static members of the class. (Of course, global functions and data my be accessed by static member functions.) A static member function does not have a this pointer....", (C++ The Complete Reference, Third Edition - Herbert Schildt, p.315). The reason that a static member can't access non-static members is because it doesn't have a this pointer and has no frame of reference to get to the data, but a static data member is a single defined instance which therefore has a specific place in memory that can be directly refered to. There still only needs to be one copy of the member function. In the end a static member is a special case used to overcome specific problems. =20 Jason. =20 =20 ----- Original Message -----=20 From: Daniel <mailto:sp...@ho...> Glenfield=20 To: dev...@li...=20 Sent: Monday, October 22, 2001 9:48 PM Subject: RE: [Dev-C++] Strange effect objects have their own data members, they share the member functions in the class they are a part of. They do not have their own functions, this I am sure of. >From: "Ioannis Vranos"=20 >To: "Dev-C++"=20 >Subject: RE: [Dev-C++] Strange effect=20 >Date: Mon, 22 Oct 2001 23:43:25 +0200=20 >=20 >:) That every object has its own data members whhich these functions=20 >manipulate. Except of that, for what static data members and static=20 >member functions exist for?=20 >=20 >=20 >=20 >Ioannis=20 >=20 >* Ioannis Vranos=20 >* Programming pages: http://www.noicys.f2s.com=20 >=20 >* Alternative URL: http://run.to/noicys=20 >=20 >-----Original Message-----=20 >From: dev...@li...=20 >[mailto:dev...@li...] On Behalf Of Daniel=20 >Glenfield=20 >Sent: Monday, October 22, 2001 10:30 PM=20 >To: dev...@li...=20 >Subject: RE: [Dev-C++] Strange effect=20 >=20 >=20 >=20 >I am 100% certain that each object does NOT have it's own copy of the=20 >member functions. What reason would there be?=20 >=20 >=20 >=20 > >From: "Ioannis Vranos"=20 > >To: "Dev-C++"=20 > >Subject: RE: [Dev-C++] Strange effect=20 > >Date: Mon, 22 Oct 2001 22:44:21 +0200=20 > >=20 > >I do not think this is true. Every object has its own member functions.=20 >=20 > >Except of that, here wrong data members are being created too.=20 > >=20 > >=20 > >Ioannis=20 > >=20 > >* Ioannis Vranos=20 > >* Programming pages: http://www.noicys.f2s.com=20 > >=20 > >* Alternative URL: http://run.to/noicys=20 > >=20 > >=20 > >-----Original Message-----=20 > >From: dev...@li...=20 > >[mailto:dev...@li...] On Behalf Of Daniel=20 > >Glenfield=20 > >Sent: Monday, October 22, 2001 7:56 PM=20 > >To: dev...@li...=20 > >Subject: RE: [Dev-C++] Strange effect=20 > >=20 > >=20 > >=20 > >An object holds it's own data members but does not have it's own copy >of=20 > >member functions - there is one instance of a member function that is > >used by all (since it does not change, while data members do).=20 > >=20 >=20 > _____=20 >=20 >Get your FREE download of MSN Explorer at http://explorer.msn.com=20 >=20 >_______________________________________________ Dev-cpp-users mailing=20 >list Dev...@li...=20 >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 >=20 _____ =20 Get your FREE download of MSN Explorer at http://explorer.msn.com <http://go.msn.com/bql/hmtag_itl_EN.asp>=20 _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Ioannis V. <no...@ya...> - 2001-10-23 08:12:35
|
What do you mean invalid escape. Escape sequences begin with \, not /. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of John Barnett > Sent: Monday, October 22, 2001 10:55 PM > To: dev...@li... > Subject: [Dev-C++] (no subject) >=20 >=20 > I need help with bloodshed, in the system portion of the code=20 > is there=20 > anyway for the developer to cause Dev to recognize "/"=20 > without it being=20 > shown as an invalid escape? I wanted to create a program that=20 > allows users=20 > to rename logo.sys and so forth yet I can't see how to do=20 > that. Please help. >=20 > _________________________________________________________________ > Get your FREE download of MSN Explorer at=20 > http://explorer.msn.com/intl.asp >=20 >=20 >=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >=20 |
|
From: Jason H. <jas...@bt...> - 2001-10-23 03:32:08
|
I'm glad someone else agrees with me. :) Now onto the static issue, "In C++, when static is used on a class = *data* member, it causes only one copy of that member to be shared by = all objects of its class", (C/C++ Programmer's Reference, second edition = - Herbert Schildt). "Member functions may also be declared as static. There are several = restrictions placed on static member functions. They may only directly = refer to other static members of the class. (Of course, global functions = and data my be accessed by static member functions.) A static member = function does not have a this pointer....", (C++ The Complete Reference, = Third Edition - Herbert Schildt, p.315). The reason that a static member = can't access non-static members is because it doesn't have a this = pointer and has no frame of reference to get to the data, but a static = data member is a single defined instance which therefore has a specific = place in memory that can be directly refered to. There still only needs = to be one copy of the member function. In the end a static member is a = special case used to overcome specific problems. Jason. ----- Original Message -----=20 From: Daniel Glenfield=20 To: dev...@li...=20 Sent: Monday, October 22, 2001 9:48 PM Subject: RE: [Dev-C++] Strange effect objects have their own data members, they share the member functions = in the class they are a part of. They do not have their own functions, = this I am sure of. >From: "Ioannis Vranos"=20 >To: "Dev-C++"=20 >Subject: RE: [Dev-C++] Strange effect=20 >Date: Mon, 22 Oct 2001 23:43:25 +0200=20 >=20 >:) That every object has its own data members whhich these functions=20 >manipulate. Except of that, for what static data members and static=20 >member functions exist for?=20 >=20 >=20 >=20 >Ioannis=20 >=20 >* Ioannis Vranos=20 >* Programming pages: http://www.noicys.f2s.com=20 >=20 >* Alternative URL: http://run.to/noicys=20 >=20 >-----Original Message-----=20 >From: dev...@li...=20 >[mailto:dev...@li...] On Behalf Of = Daniel=20 >Glenfield=20 >Sent: Monday, October 22, 2001 10:30 PM=20 >To: dev...@li...=20 >Subject: RE: [Dev-C++] Strange effect=20 >=20 >=20 >=20 >I am 100% certain that each object does NOT have it's own copy of the = >member functions. What reason would there be?=20 >=20 >=20 >=20 > >From: "Ioannis Vranos"=20 > >To: "Dev-C++"=20 > >Subject: RE: [Dev-C++] Strange effect=20 > >Date: Mon, 22 Oct 2001 22:44:21 +0200=20 > >=20 > >I do not think this is true. Every object has its own member = functions.=20 >=20 > >Except of that, here wrong data members are being created too.=20 > >=20 > >=20 > >Ioannis=20 > >=20 > >* Ioannis Vranos=20 > >* Programming pages: http://www.noicys.f2s.com=20 > >=20 > >* Alternative URL: http://run.to/noicys=20 > >=20 > >=20 > >-----Original Message-----=20 > >From: dev...@li...=20 > >[mailto:dev...@li...] On Behalf Of = Daniel=20 > >Glenfield=20 > >Sent: Monday, October 22, 2001 7:56 PM=20 > >To: dev...@li...=20 > >Subject: RE: [Dev-C++] Strange effect=20 > >=20 > >=20 > >=20 > >An object holds it's own data members but does not have it's own = copy=20 >of=20 > >member functions - there is one instance of a member function that = is=20 > >used by all (since it does not change, while data members do).=20 > >=20 >=20 > _____=20 >=20 >Get your FREE download of MSN Explorer at http://explorer.msn.com=20 >=20 >_______________________________________________ Dev-cpp-users mailing = >list Dev...@li...=20 >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 >=20 -------------------------------------------------------------------------= ----- Get your FREE download of MSN Explorer at http://explorer.msn.com _______________________________________________ Dev-cpp-users mailing = list Dev...@li... = https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Jason H. <jas...@bt...> - 2001-10-23 03:11:58
|
I do not see how that passage would prove that each object has it's own copy of a member fuction. In fact the oposite: 'A class member function always "knows" for which object it was invoked', which implies that there is one function and it is made aware of the specific object it is being used upon. BTW I don't have a special edition, but I do have the third edition of Stroustrup. As for the creation of the variable, there is a distinction between the creation of the space for the variable and the initialisation of it. What you are doing in your code is writing to where the compiler thinks the variable should be, even though for that object it hasn't been defined in memory. Technically you are writing to unallocated memory. If the variables were bigger then you would risk overwriting into something else, or causing an access violation. Jason. ----- Original Message ----- From: "Ioannis Vranos" <no...@ya...> To: "Dev-C++" <dev...@li...> Sent: Monday, October 22, 2001 1:29 PM Subject: RE: [Dev-C++] Strange effect If i recall correctly, you have Special Edition. Take a look at 10.2.1 on page 224. But if you notice in my examples even wrong data members are being created! Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Jason Hardman > Sent: Monday, October 22, 2001 12:10 AM > To: Dev-C++ > Subject: Re: [Dev-C++] Strange effect > > > Is this just your belief or can you prove that this is the > case from some external referece or knowledgable party (other > than yourself)? > > As I have been given to understand it the case of there only > being one set of methods existing in memory for a class, and > then each method being passed a hidden pointer to the object > is the true case. Hence the existence of the "this" pointer > for use in a class. I would also like to mention that the way > you would have it is unecessarily wasteful of resources. The > issue becomes more complex with virtual methods and such, but > I won't go into that right now. > > I wouldn't mind if someone else who is reading this > discussion, and is knowledgable about the subject, putting us > both on the correct path. > > Jason. > > ----- Original Message ----- > From: "Ioannis Vranos" <no...@ya...> > To: "Dev-C++" <dev...@li...> > Sent: Sunday, October 21, 2001 3:14 PM > Subject: RE: [Dev-C++] Strange effect > > > Yes, when we create an object all member functions are being > (re)created for that particual object. > > > > >do you believe that there are only a single set of methods for every > object of a type, and the objects only contain the data? > > > No. > > > > _______________________________________________ > 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 |
|
From: Jason H. <jas...@bt...> - 2001-10-23 03:02:57
|
To produce a single backslash character in a string literal you actualy = have to use a double backslash, one for the escape and one to say you = want a backslash, i.e. char path[] =3D "C:\\foo\\bar.exe"; Jason. ----- Original Message -----=20 From: Daniel Glenfield=20 To: dev...@li...=20 Sent: Monday, October 22, 2001 10:00 PM Subject: Re: [Dev-C++] (no subject) oooooooooooh I know this, I know this....you have to enclose it = between something...ummmmmm...........bugger I can't think what it is. >From: "John Barnett"=20 >To: dev...@li...=20 >Subject: [Dev-C++] (no subject)=20 >Date: Mon, 22 Oct 2001 15:54:43 -0500=20 >=20 >I need help with bloodshed, in the system portion of the code is=20 >there=20 >anyway for the developer to cause Dev to recognize "/" without it=20 >being=20 >shown as an invalid escape? I wanted to create a program that allows=20 >users=20 >to rename logo.sys and so forth yet I can't see how to do that.=20 >Please help.=20 >=20 >_________________________________________________________________=20 >Get your FREE download of MSN Explorer at=20 >http://explorer.msn.com/intl.asp=20 >=20 >=20 >_______________________________________________=20 >Dev-cpp-users mailing list=20 >Dev...@li...=20 >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 -------------------------------------------------------------------------= ----- Get your FREE download of MSN Explorer at http://explorer.msn.com _______________________________________________ Dev-cpp-users mailing = list Dev...@li... = https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Richard W. <cal...@su...> - 2001-10-22 23:22:50
|
Why does DevC++ 4.0 write to / update the c:\windows\COOKIES Directory? Not even Netscape uses that for anything, apparently. So whats the story? Item 2: there's a PrintDlg example that comes with DevC++ 4.0. Does anyone happen to have a COMPLETE source for printing an ENTIRE ascii text file? doesn't have to support fancy fonts or anything; I just want to print an ASCII text file. Thanks Item 3: I need a modest but working example of using a FileList Box, Directory List Box, DriveCombo Box, FileExtensionCombo box, on a form and how changing any one causes an automatic update of the rest of these things... Any suggestions here would be appreciated. Thanks Wishlist: Now for the VisualDesigner for DevC++ so we can place components on a form and double-click to write its code... just like in CBuilder and Krylex(sp) for Linux... hehe. Observation: Has anyone noticed that DevC++ 4.0 appears to create EXE's that are smaller than MSVC 6.0 ??? |
|
From: Daniel G. <sp...@ho...> - 2001-10-22 21:00:42
|
<html><div style='background-color:'><DIV> <P>oooooooooooh I know this, I know this....you have to enclose it between something...ummmmmm...........bugger I can't think what it is.<BR><BR></P></DIV> <DIV></DIV> <DIV></DIV>>From: "John Barnett" <SER...@HO...> <DIV></DIV>>To: dev...@li... <DIV></DIV>>Subject: [Dev-C++] (no subject) <DIV></DIV>>Date: Mon, 22 Oct 2001 15:54:43 -0500 <DIV></DIV>> <DIV></DIV>>I need help with bloodshed, in the system portion of the code is <DIV></DIV>>there <DIV></DIV>>anyway for the developer to cause Dev to recognize "/" without it <DIV></DIV>>being <DIV></DIV>>shown as an invalid escape? I wanted to create a program that allows <DIV></DIV>>users <DIV></DIV>>to rename logo.sys and so forth yet I can't see how to do that. <DIV></DIV>>Please help. <DIV></DIV>> <DIV></DIV>>_________________________________________________________________ <DIV></DIV>>Get your FREE download of MSN Explorer at <DIV></DIV>>http://explorer.msn.com/intl.asp <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>_______________________________________________ <DIV></DIV>>Dev-cpp-users mailing list <DIV></DIV>>Dev...@li... <DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html> |
|
From: John B. <ser...@ho...> - 2001-10-22 20:54:52
|
I need help with bloodshed, in the system portion of the code is there anyway for the developer to cause Dev to recognize "/" without it being shown as an invalid escape? I wanted to create a program that allows users to rename logo.sys and so forth yet I can't see how to do that. Please help. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: Daniel G. <sp...@ho...> - 2001-10-22 20:48:37
|
<html><div style='background-color:'><DIV> <P><BR><BR></P> <DIV> <DIV></DIV> <P>objects have their own data members, they share the member functions in the class they are a part of. They do not have their own functions, this I am sure of.<BR><BR></P></DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV>>From: "Ioannis Vranos" <NO...@YA...> <DIV></DIV> <DIV></DIV>>To: "Dev-C++" <DEV...@LI...> <DIV></DIV> <DIV></DIV>>Subject: RE: [Dev-C++] Strange effect <DIV></DIV> <DIV></DIV>>Date: Mon, 22 Oct 2001 23:43:25 +0200 <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>>:) That every object has its own data members whhich these functions <DIV></DIV> <DIV></DIV>>manipulate. Except of that, for what static data members and static <DIV></DIV> <DIV></DIV>>member functions exist for? <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>>Ioannis <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>>* Ioannis Vranos <DIV></DIV> <DIV></DIV>>* Programming pages: http://www.noicys.f2s.com <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>>* Alternative URL: http://run.to/noicys <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>>-----Original Message----- <DIV></DIV> <DIV></DIV>>From: dev...@li... <DIV></DIV> <DIV></DIV>>[mailto:dev...@li...] On Behalf Of Daniel <DIV></DIV> <DIV></DIV>>Glenfield <DIV></DIV> <DIV></DIV>>Sent: Monday, October 22, 2001 10:30 PM <DIV></DIV> <DIV></DIV>>To: dev...@li... <DIV></DIV> <DIV></DIV>>Subject: RE: [Dev-C++] Strange effect <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>>I am 100% certain that each object does NOT have it's own copy of the <DIV></DIV> <DIV></DIV>>member functions. What reason would there be? <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>> >From: "Ioannis Vranos" <DIV></DIV> <DIV></DIV>> >To: "Dev-C++" <DIV></DIV> <DIV></DIV>> >Subject: RE: [Dev-C++] Strange effect <DIV></DIV> <DIV></DIV>> >Date: Mon, 22 Oct 2001 22:44:21 +0200 <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> >I do not think this is true. Every object has its own member functions. <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>> >Except of that, here wrong data members are being created too. <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> >Ioannis <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> >* Ioannis Vranos <DIV></DIV> <DIV></DIV>> >* Programming pages: http://www.noicys.f2s.com <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> >* Alternative URL: http://run.to/noicys <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> >-----Original Message----- <DIV></DIV> <DIV></DIV>> >From: dev...@li... <DIV></DIV> <DIV></DIV>> >[mailto:dev...@li...] On Behalf Of Daniel <DIV></DIV> <DIV></DIV>> >Glenfield <DIV></DIV> <DIV></DIV>> >Sent: Monday, October 22, 2001 7:56 PM <DIV></DIV> <DIV></DIV>> >To: dev...@li... <DIV></DIV> <DIV></DIV>> >Subject: RE: [Dev-C++] Strange effect <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> >An object holds it's own data members but does not have it's own copy <DIV></DIV> <DIV></DIV>>of <DIV></DIV> <DIV></DIV>> >member functions - there is one instance of a member function that is <DIV></DIV> <DIV></DIV>> >used by all (since it does not change, while data members do). <DIV></DIV> <DIV></DIV>> > <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>> _____ <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>>Get your FREE download of MSN Explorer at http://explorer.msn.com <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV>>_______________________________________________ Dev-cpp-users mailing <DIV></DIV> <DIV></DIV>>list Dev...@li... <DIV></DIV> <DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV> <DIV></DIV>> <DIV></DIV> <DIV></DIV> <DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html> |
|
From: Ioannis V. <no...@ya...> - 2001-10-22 20:41:44
|
:) That every object has its own data members whhich these functions manipulate. Except of that, for what static data members and static member functions exist for? =20 =20 =20 Ioannis =20 * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com <http://www.noicys.f2s.com/>=20 * Alternative URL: http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Daniel Glenfield Sent: Monday, October 22, 2001 10:30 PM To: dev...@li... Subject: RE: [Dev-C++] Strange effect I am 100% certain that each object does NOT have it's own copy of the member functions. What reason would there be? >From: "Ioannis Vranos"=20 >To: "Dev-C++"=20 >Subject: RE: [Dev-C++] Strange effect=20 >Date: Mon, 22 Oct 2001 22:44:21 +0200=20 >=20 >I do not think this is true. Every object has its own member functions. >Except of that, here wrong data members are being created too.=20 >=20 >=20 >Ioannis=20 >=20 >* Ioannis Vranos=20 >* Programming pages: http://www.noicys.f2s.com=20 >=20 >* Alternative URL: http://run.to/noicys=20 >=20 >=20 >-----Original Message-----=20 >From: dev...@li...=20 >[mailto:dev...@li...] On Behalf Of Daniel=20 >Glenfield=20 >Sent: Monday, October 22, 2001 7:56 PM=20 >To: dev...@li...=20 >Subject: RE: [Dev-C++] Strange effect=20 >=20 >=20 >=20 >An object holds it's own data members but does not have it's own copy of=20 >member functions - there is one instance of a member function that is=20 >used by all (since it does not change, while data members do).=20 >=20 _____ =20 Get your FREE download of MSN Explorer at http://explorer.msn.com <http://go.msn.com/bql/hmtag_itl_EN.asp>=20 _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 |
|
From: Daniel G. <sp...@ho...> - 2001-10-22 20:30:43
|
<html><div style='background-color:'><DIV> <P>I am 100% certain that each object does NOT have it's own copy of the member functions. What reason would there be?<BR><BR></P></DIV> <DIV></DIV> <DIV></DIV>>From: "Ioannis Vranos" <NO...@YA...> <DIV></DIV>>To: "Dev-C++" <DEV...@LI...> <DIV></DIV>>Subject: RE: [Dev-C++] Strange effect <DIV></DIV>>Date: Mon, 22 Oct 2001 22:44:21 +0200 <DIV></DIV>> <DIV></DIV>>I do not think this is true. Every object has its own member functions. <DIV></DIV>>Except of that, here wrong data members are being created too. <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>Ioannis <DIV></DIV>> <DIV></DIV>>* Ioannis Vranos <DIV></DIV>>* Programming pages: http://www.noicys.f2s.com <DIV></DIV>> <DIV></DIV>>* Alternative URL: http://run.to/noicys <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>-----Original Message----- <DIV></DIV>>From: dev...@li... <DIV></DIV>>[mailto:dev...@li...] On Behalf Of Daniel <DIV></DIV>>Glenfield <DIV></DIV>>Sent: Monday, October 22, 2001 7:56 PM <DIV></DIV>>To: dev...@li... <DIV></DIV>>Subject: RE: [Dev-C++] Strange effect <DIV></DIV>> <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>An object holds it's own data members but does not have it's own copy of <DIV></DIV>>member functions - there is one instance of a member function that is <DIV></DIV>>used by all (since it does not change, while data members do). <DIV></DIV>> <DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html> |
|
From: Ioannis V. <no...@ya...> - 2001-10-22 19:52:17
|
Also check http://www.research.att.com/~bs/3rd_notes.pdf which is a peice of Stroustrup's Special Edition. Be sure to check http://www.research.att.com/~bs which is the page of Bjarne Stroustrup (the creator of C++).=20 =20 This is the page of Special Edition: http://www.research.att.com/~bs/3rd.html =20 =20 Ioannis =20 * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com <http://www.noicys.f2s.com/>=20 * Alternative URL: http://run.to/noicys =20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Daniel Glenfield Sent: Monday, October 22, 2001 8:06 PM To: dev...@li... Subject: RE: [Dev-C++] using strings Are you sure? I was taught to always ALWAYS do <iostream.h> . Even when they spoke about it in my course they said iostream.h >From: "Ioannis Vranos"=20 >To: "Dev-C++"=20 >Subject: RE: [Dev-C++] using strings=20 >Date: Mon, 22 Oct 2001 14:23:17 +0200=20 >=20 >string.h is the C header file. ANSI C++ header files are without .h and >more properly written:=20 >=20 >#include=20 >#include // For setw()=20 >#include // For file I/O=20 >#include=20 >=20 >=20 >=20 >int main()=20 >{=20 > using namespace std;=20 >=20 > string s1;=20 > char pause;=20 >=20 > cin >> s1;=20 > cout << endl << s1 << endl;=20 > cout << "pause";=20 > cin >> pause;=20 >=20 >}=20 >=20 >=20 >return 0; is not needed in ANSI C++. If in main() you do not return any >value, 0 is automatically returned to the system.=20 >=20 >=20 >Ioannis=20 >=20 >* Ioannis Vranos=20 >* Programming pages: http://www.noicys.f2s.com=20 >=20 >* Alternative URL: http://run.to/noicys=20 >=20 >=20 >-----Original Message-----=20 >From: dev...@li...=20 >[mailto:dev...@li...] On Behalf Of Daniel=20 >Anderson=20 >Sent: Sunday, October 21, 2001 7:38 PM=20 >To: dev...@li...=20 >Subject: [Dev-C++] using strings=20 >=20 >=20 >Hello,=20 >A seemingly simple problem has stumped me so far. I cannot figure out=20 >how to use simple strings in my programs. Do I need to add the=20 > library? If so, my compiler says it can't find it- can I=20 >download this somewhere? I know I can get around this problem by using=20 >an array of chars, but I want to be able to use strings. I am using Dev >4.01 and the mingw compiler 2.95.2-1. A thousand thanks for any help.=20 >=20 >D=20 >=20 >When I try to compile this program, I can a 'string' undeclared (first=20 >use this function) error.=20 >// start=20 >=20 >#include=20 >#include // For setw()=20 >#include // For file I/O=20 >#include=20 >=20 >using namespace std;=20 >=20 >int main()=20 >{=20 > string s1;=20 > char pause;=20 >=20 > cin >> s1;=20 > cout << endl << s1 << endl;=20 > cout << "pause";=20 > cin >> pause;=20 >=20 >=20 > return 0;=20 >}=20 >=20 _____ =20 Get your FREE download of MSN Explorer at http://explorer.msn.com <http://go.msn.com/bql/hmtag_itl_EN.asp>=20 _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 |
|
From: Ioannis V. <no...@ya...> - 2001-10-22 19:43:43
|
Positive. ANSI C++ header files have no .h and all their contents are defined and declared in std namespace. =20 =20 Ioannis =20 * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com <http://www.noicys.f2s.com/>=20 * Alternative URL: http://run.to/noicys =20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Daniel Glenfield Sent: Monday, October 22, 2001 8:06 PM To: dev...@li... Subject: RE: [Dev-C++] using strings Are you sure? I was taught to always ALWAYS do <iostream.h> . Even when they spoke about it in my course they said iostream.h >From: "Ioannis Vranos"=20 >To: "Dev-C++"=20 >Subject: RE: [Dev-C++] using strings=20 >Date: Mon, 22 Oct 2001 14:23:17 +0200=20 >=20 >string.h is the C header file. ANSI C++ header files are without .h and >more properly written:=20 >=20 >#include=20 >#include // For setw()=20 >#include // For file I/O=20 >#include=20 >=20 >=20 >=20 >int main()=20 >{=20 > using namespace std;=20 >=20 > string s1;=20 > char pause;=20 >=20 > cin >> s1;=20 > cout << endl << s1 << endl;=20 > cout << "pause";=20 > cin >> pause;=20 >=20 >}=20 >=20 >=20 >return 0; is not needed in ANSI C++. If in main() you do not return any >value, 0 is automatically returned to the system.=20 >=20 >=20 >Ioannis=20 >=20 >* Ioannis Vranos=20 >* Programming pages: http://www.noicys.f2s.com=20 >=20 >* Alternative URL: http://run.to/noicys=20 >=20 >=20 >-----Original Message-----=20 >From: dev...@li...=20 >[mailto:dev...@li...] On Behalf Of Daniel=20 >Anderson=20 >Sent: Sunday, October 21, 2001 7:38 PM=20 >To: dev...@li...=20 >Subject: [Dev-C++] using strings=20 >=20 >=20 >Hello,=20 >A seemingly simple problem has stumped me so far. I cannot figure out=20 >how to use simple strings in my programs. Do I need to add the=20 > library? If so, my compiler says it can't find it- can I=20 >download this somewhere? I know I can get around this problem by using=20 >an array of chars, but I want to be able to use strings. I am using Dev >4.01 and the mingw compiler 2.95.2-1. A thousand thanks for any help.=20 >=20 >D=20 >=20 >When I try to compile this program, I can a 'string' undeclared (first=20 >use this function) error.=20 >// start=20 >=20 >#include=20 >#include // For setw()=20 >#include // For file I/O=20 >#include=20 >=20 >using namespace std;=20 >=20 >int main()=20 >{=20 > string s1;=20 > char pause;=20 >=20 > cin >> s1;=20 > cout << endl << s1 << endl;=20 > cout << "pause";=20 > cin >> pause;=20 >=20 >=20 > return 0;=20 >}=20 >=20 _____ =20 Get your FREE download of MSN Explorer at http://explorer.msn.com <http://go.msn.com/bql/hmtag_itl_EN.asp>=20 _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 |
|
From: Ioannis V. <no...@ya...> - 2001-10-22 19:42:39
|
I do not think this is true. Every object has its own member functions. Except of that, here wrong data members are being created too. =20 =20 Ioannis =20 * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com <http://www.noicys.f2s.com/>=20 * Alternative URL: http://run.to/noicys =20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Daniel Glenfield Sent: Monday, October 22, 2001 7:56 PM To: dev...@li... Subject: RE: [Dev-C++] Strange effect An object holds it's own data members but does not have it's own copy of member functions - there is one instance of a member function that is used by all (since it does not change, while data members do). |
|
From: Ioannis V. <no...@ya...> - 2001-10-22 19:39:30
|
> -----Original Message----- > From: KJK::Hyperion [mailto:no...@li...]=20 > Sent: Monday, October 22, 2001 6:08 PM > To: Ioannis Vranos > Subject: RE: [Dev-C++] Errorhandling > > only in C code or C-minded C++ code. In C++ you use one of=20 > the countless=20 > string classes and you're done, they allow embedded nulls and=20 > whatsoever=20 > since they generally have a length field. Heck, even OLE's=20 > BSTR does, and=20 > it's a plain struct Now all these are details but we must clear details. :) Yes i strongly agree with you, in C++ code we should use standard library object and containers not low level (dangerous) C stuff. >=20 > Even in the case, it MAY at most cause memory leaks (strlen=20 > returns less=20 > chars than actually allocated), but only if the compiler=20 At most it can cause anything depending on how our code thinks on doing things. We could depend on sizeof to get the length of the string (wrong approach), write some code performing for example binary search with the possibility to encounter the last '\0; instead of the first, and this because we assume the string has only one '\0'. The ways to screw up are infinite. :) The most important thing to think is that we must not use the form "string\0". :) > allocates string=20 > literals as variants, something it SHOULDN'T do (string=20 > literals SHOULD be=20 > considered constants). Else the incriminated strings remain=20 We were talking about C stuff ( strcat(buffer, "string\0"); where our "string\0" would be added to string stored in buffer. String literals of course must not be dealt as variables. > exactly the=20 > same, untouched, and the extra null is ignored >=20 In case of strcat() operatios the extra null is ignored but i am talking for troubles in general. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys |
|
From: Daniel G. <sp...@ho...> - 2001-10-22 18:06:48
|
<html><div style='background-color:'><DIV>
<P>Are you sure? I was taught to always ALWAYS do <iostream.h> . Even when they spoke about it in my course they said iostream.h<BR><BR></P></DIV>
<DIV></DIV>
<DIV></DIV>>From: "Ioannis Vranos" <NO...@YA...>
<DIV></DIV>>To: "Dev-C++" <DEV...@LI...>
<DIV></DIV>>Subject: RE: [Dev-C++] using strings
<DIV></DIV>>Date: Mon, 22 Oct 2001 14:23:17 +0200
<DIV></DIV>>
<DIV></DIV>>string.h is the C header file. ANSI C++ header files are without .h and
<DIV></DIV>>more properly written:
<DIV></DIV>>
<DIV></DIV>>#include <IOSTREAM>
<DIV></DIV>>#include <IOMANIP>// For setw()
<DIV></DIV>>#include <FSTREAM>// For file I/O
<DIV></DIV>>#include <STRING>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>int main()
<DIV></DIV>>{
<DIV></DIV>> using namespace std;
<DIV></DIV>>
<DIV></DIV>> string s1;
<DIV></DIV>> char pause;
<DIV></DIV>>
<DIV></DIV>> cin >> s1;
<DIV></DIV>> cout << endl << s1 << endl;
<DIV></DIV>> cout << "pause";
<DIV></DIV>> cin >> pause;
<DIV></DIV>>
<DIV></DIV>>}
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>return 0; is not needed in ANSI C++. If in main() you do not return any
<DIV></DIV>>value, 0 is automatically returned to the system.
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Ioannis
<DIV></DIV>>
<DIV></DIV>>* Ioannis Vranos
<DIV></DIV>>* Programming pages: http://www.noicys.f2s.com
<DIV></DIV>><HTTP: www.noicys.f2s.com />
<DIV></DIV>>* Alternative URL: http://run.to/noicys
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>-----Original Message-----
<DIV></DIV>>From: dev...@li...
<DIV></DIV>>[mailto:dev...@li...] On Behalf Of Daniel
<DIV></DIV>>Anderson
<DIV></DIV>>Sent: Sunday, October 21, 2001 7:38 PM
<DIV></DIV>>To: dev...@li...
<DIV></DIV>>Subject: [Dev-C++] using strings
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Hello,
<DIV></DIV>>A seemingly simple problem has stumped me so far. I cannot figure out
<DIV></DIV>>how to use simple strings in my programs. Do I need to add the
<DIV></DIV>><CSTRING.H> library? If so, my compiler says it can't find it- can I
<DIV></DIV>>download this somewhere? I know I can get around this problem by using
<DIV></DIV>>an array of chars, but I want to be able to use strings. I am using Dev
<DIV></DIV>>4.01 and the mingw compiler 2.95.2-1. A thousand thanks for any help.
<DIV></DIV>>
<DIV></DIV>>D
<DIV></DIV>>
<DIV></DIV>>When I try to compile this program, I can a 'string' undeclared (first
<DIV></DIV>>use this function) error.
<DIV></DIV>>// start
<DIV></DIV>>
<DIV></DIV>>#include <IOSTREAM.H>
<DIV></DIV>>#include <IOMANIP.H>// For setw()
<DIV></DIV>>#include <FSTREAM.H>// For file I/O
<DIV></DIV>>#include <STRING.H>
<DIV></DIV>>
<DIV></DIV>>using namespace std;
<DIV></DIV>>
<DIV></DIV>>int main()
<DIV></DIV>>{
<DIV></DIV>> string s1;
<DIV></DIV>> char pause;
<DIV></DIV>>
<DIV></DIV>> cin >> s1;
<DIV></DIV>> cout << endl << s1 << endl;
<DIV></DIV>> cout << "pause";
<DIV></DIV>> cin >> pause;
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> return 0;
<DIV></DIV>>}
<DIV></DIV>>
<DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html>
|
|
From: Daniel G. <sp...@ho...> - 2001-10-22 17:55:42
|
<html><div style='background-color:'><P>An object holds it's own data members but does not have it's own copy of member functions - there is one instance of a member function that is used by all (since it does not change, while data members do).</P> <P> </P> <DIV>> > -----Original Message----- </DIV> <DIV></DIV>> > From: dev...@li... <DIV></DIV>> > [mailto:dev...@li...] On Behalf <DIV></DIV>> > Of Jason Hardman <DIV></DIV>> > Sent: Monday, October 22, 2001 12:10 AM <DIV></DIV>> > To: Dev-C++ <DIV></DIV>> > Subject: Re: [Dev-C++] Strange effect <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > Is this just your belief or can you prove that this is the <DIV></DIV>> > case from some external referece or knowledgable party (other <DIV></DIV>> > than yourself)? <DIV></DIV>> > <DIV></DIV>> > As I have been given to understand it the case of there only <DIV></DIV>> > being one set of methods existing in memory for a class, and <DIV></DIV>> > then each method being passed a hidden pointer to the object <DIV></DIV>> > is the true case. Hence the existence of the "this" pointer <DIV></DIV>> > for use in a class. I would also like to mention that the way <DIV></DIV>> > you would have it is unecessarily wasteful of resources. The <DIV></DIV>> > issue becomes more complex with virtual methods and such, but <DIV></DIV>> > I won't go into that right now. <DIV></DIV>> > <DIV></DIV>> > I wouldn't mind if someone else who is reading this <DIV></DIV>> > discussion, and is knowledgable about the subject, putting us <DIV></DIV>> > both on the correct path. <DIV></DIV>> > <DIV></DIV>> > Jason. <DIV></DIV>> > <DIV></DIV>> > ----- Original Message ----- <DIV></DIV>> > From: "Ioannis Vranos" <NO...@YA...> <DIV></DIV>> > To: "Dev-C++" <DEV...@LI...> <DIV></DIV>> > Sent: Sunday, October 21, 2001 3:14 PM <DIV></DIV>> > Subject: RE: [Dev-C++] Strange effect <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > Yes, when we create an object all member functions are being <DIV></DIV>> > (re)created for that particual object. <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > >do you believe that there are only a single set of methods for every <DIV></DIV>> > object of a type, and the objects only contain the data? <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > No. <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > <DIV></DIV>> > _______________________________________________ <DIV></DIV>> > Dev-cpp-users mailing list <DIV></DIV>> > Dev...@li... <DIV></DIV>> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV>> > <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>_______________________________________________ <DIV></DIV>>Dev-cpp-users mailing list <DIV></DIV>>Dev...@li... <DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users <DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html> |
|
From: Lorenzo <co...@in...> - 2001-10-22 12:51:44
|
You must add to project the file "libcomctl32.a" ---------------------------------------------------------------------------- --- If debugging is the process of removing bugs, then programming must be the process of putting them in. ---------------------------------------------------------------------------- --- |
|
From: jeff <jfo...@ci...> - 2001-10-22 12:26:46
|
Hello,
When I try to compile my program with a statusBar function, I have the =
following linker message :
MyWindowProgram.o(.text+0x182):MyWindowProgram.cpp: undefined =
reference to `CreateStatusWindowA@16'
I specify that :
I have include the #include <commctrl.h>=20
I try it under windows 2000
=20
I saw that there are two files on the lib directory : COMCTL32.def and =
libCOMCTL32.a. In the first one there is a reference to =
CreateStatusWindoA@16.
What's the problem ? Thank's to you
regards
Cordialement
Jean-Fran=E7ois Ossatte
jfo...@ci...
(33) 04-77-91-06-14
.. =20
--------------------------ooO(v)Ooo---------------------
Ci-Soft
1 rue de la Presse
42950 Saint-Etienne Cedex 9
(33) 04-77-91-06-07
www.ci-soft.com
-------------------------------------------------------------------------=
----------
|
|
From: Ioannis V. <no...@ya...> - 2001-10-22 11:37:18
|
> -----Original Message----- > From: Luigi Santillo [mailto:gi...@li...]=20 > Sent: Sunday, October 21, 2001 12:57 PM > To: Ioannis Vranos > Subject: RE: [Dev-C++] possible bug of MinGW compiler >=20 >=20 > Hi, >=20 > thanks again for your answer and excuse me if I my previous=20 > post was not so=20 > explicit, here I reformulate my question: >=20 > given the program "test.exe", the two commands > test < in.txt > test type on stdin the content of file "in.txt" > are equivalent (as I think) or not? Yes, with the exception that in the case of file redirection you get also an EOF at the end of file automatically, but you must enter it manually when you use stdin. > >If you want to be executed per input try using '\n' too. >=20 > What do you mean by: "executed per input"? Probably what you=20 > are suggesting=20 > is this: when I press "return" a newline is appended to the=20 > input and stdin=20 > is flushed, so the program "test.exe" counts what is on the=20 > line, it then=20 > pauses waiting for new input or for EOF (in which case it stops). I mean to look for '\n' too.=20 =20 > Well, if that is what you mean, then don't you think the=20 > problem will be=20 > there again when the input is made of one line with no '\n'? I do not completely understand what is the problem. The program behaves as you wrote it to do. When do you want it to stop automatically when you use keyboard? I assume when you press enter that's why the '\n' i told you. If you want, you can separate the file functioning of the keyboard functioning by providing the filename as an argument and using standard library I/O. You can even check argc and argv to see if you provided any argument with '<' and it to assume automatically that you have redirected input, so when it finds '<' to use EOF, when it doesn't find any '<' to use '\n'. =20 > >This is how it worked for me: > > > >C:\c>temp > >sdaff > >^Z > >n =3D 6 stdin > >C:\c> >=20 > Which compiler did you use? Since you did not specify, does=20 > that mean you used gcc version 2.95.2 19991024 (release)=20 > (i.e. same as mine)? C:\Dev-C++\Bin>gcc -v Using builtin specs. gcc version 2.95.2 19991024 (release) Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ya...> - 2001-10-22 11:27:50
|
If i recall correctly, you have Special Edition. Take a look at 10.2.1 on page 224. But if you notice in my examples even wrong data members are being created! Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Jason Hardman > Sent: Monday, October 22, 2001 12:10 AM > To: Dev-C++ > Subject: Re: [Dev-C++] Strange effect >=20 >=20 > Is this just your belief or can you prove that this is the=20 > case from some external referece or knowledgable party (other=20 > than yourself)? >=20 > As I have been given to understand it the case of there only=20 > being one set of methods existing in memory for a class, and=20 > then each method being passed a hidden pointer to the object=20 > is the true case. Hence the existence of the "this" pointer=20 > for use in a class. I would also like to mention that the way=20 > you would have it is unecessarily wasteful of resources. The=20 > issue becomes more complex with virtual methods and such, but=20 > I won't go into that right now. >=20 > I wouldn't mind if someone else who is reading this=20 > discussion, and is knowledgable about the subject, putting us=20 > both on the correct path. >=20 > Jason. >=20 > ----- Original Message ----- > From: "Ioannis Vranos" <no...@ya...> > To: "Dev-C++" <dev...@li...> > Sent: Sunday, October 21, 2001 3:14 PM > Subject: RE: [Dev-C++] Strange effect >=20 >=20 > Yes, when we create an object all member functions are being=20 > (re)created for that particual object. >=20 >=20 >=20 > >do you believe that there are only a single set of methods for every > object of a type, and the objects only contain the data? >=20 >=20 > No. >=20 >=20 >=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >=20 |
|
From: Ioannis V. <no...@ya...> - 2001-10-22 11:21:38
|
string.h is the C header file. ANSI C++ header files are without .h and
more properly written:
=20
#include <iostream>
#include <iomanip> // For setw()
#include <fstream> // For file I/O
#include <string>
=20
=20
int main()
{=20
using namespace std;
=20
string s1;
char pause;
=20
cin >> s1;
cout << endl << s1 << endl;
cout << "pause";
cin >> pause;
}
=20
=20
return 0; is not needed in ANSI C++. If in main() you do not return any
value, 0 is automatically returned to the system.
=20
=20
Ioannis
=20
* Ioannis Vranos
* Programming pages: http://www.noicys.f2s.com
<http://www.noicys.f2s.com/>=20
* Alternative URL: http://run.to/noicys
=20
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Daniel
Anderson
Sent: Sunday, October 21, 2001 7:38 PM
To: dev...@li...
Subject: [Dev-C++] using strings
Hello,
A seemingly simple problem has stumped me so far. I cannot figure out
how to use simple strings in my programs. Do I need to add the
<cstring.h> library? If so, my compiler says it can't find it- can I
download this somewhere? I know I can get around this problem by using
an array of chars, but I want to be able to use strings. I am using Dev
4.01 and the mingw compiler 2.95.2-1. A thousand thanks for any help.
=20
D
=20
When I try to compile this program, I can a 'string' undeclared (first
use this function) error.
// start
=20
#include <iostream.h>
#include <iomanip.h> // For setw()
#include <fstream.h> // For file I/O
#include <string.h>
using namespace std;
=20
int main()
{=20
string s1;
char pause;
=20
cin >> s1;
cout << endl << s1 << endl;
cout << "pause";
cin >> pause;
=20
return 0;
}
|
|
From: Nurhidayat <dh...@ma...> - 2001-10-22 05:14:27
|
At 07:08 AM 10/19/01 -0400, you wrote: >Whenever I call the header I get >C:\DEV-C_~1\INCLUDE\graphics.h:24: #error BGI graphics not ANSI >compatible I found a good library for the old-style bgi programming. Visit to http://www.cs.colorado.edu/~main/bgi/ ___Nurhidayat___ |
|
From: Maan H. <mm...@pl...> - 2001-10-22 03:17:55
|
there is no cout >>
it should be: cout <<
also you should
#include <iostream.h>
because cout is in iostream class of C++ (NOT C)
Maan
----- Original Message -----
From: "Christiaan Scholtz" <ck...@ia...>
This for example:
#include <stdio.h>
int main(int argc, char *argv[])
{
cout >> "hey";
return 0;
}
gives :
c:\mydocu~1\untitl~1.cpp: In function `int main(int, char **)':
c:\mydocu~1\untitl~1.cpp:5: `cout' undeclared (first use this function)
c:\mydocu~1\untitl~1.cpp:5: (Each undeclared identifier is reported only
once
c:\mydocu~1\untitl~1.cpp:5: for each function it appears in.)
Whats going on here? I also get diffrent messages for larger code with
nothing wrong with it.
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|