dev-cpp-users Mailing List for Dev-C++ (Page 539)
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: Carlos d. M. <cg...@wo...> - 2002-08-13 09:55:41
|
> > Just for the record, i do not like the approach you are using, it is > too C-style. > > Agree, with such things is better use classes and so, always use C++. > If you want, at first times you can start from structs if that helps > you, and then pass to classes. But the best is practice classes, and > practice and practice... And don't kill your computer. > > What kind of abnormal termination. assert()? > > The assert of the overloaded []. > I must mention that C++ provides already a string type defined in > <string>. So why do you bother? :) > > Just an example of the book with which Mr Senen is working for learn > (C/)C++. Which has a part that although being C++ shows C things, this > is used for introduce the reader to objects, overloading and such > things. It is almost the "How to Program C/C++" (same authors) with > tiny modifications because the title says it is more oriented to C++. > But the truth is that there is only one book, but they make three > parts: about 20 pages of only C for the "how to C/C++", 20 for "C++ > how to" and about 1200 for both. A way to sell two books when they > have only one, in essence. This book is which I found better for learn > programming (but I couldn't find many), and well, it seems I'm > learning, but with no few errors (I mean I have more than few errors), > I got the spanish translation (as said in a previous message) > translated by someone which should go to first course to learn > speaking, and perhaps due to his translation or the original, I found > it has some ambiguities, and misleading things. They don't pay enough > attention to a couple of pointer things, and the treatment of bitwise > operation is misleading: they say something like "usually these > operations are performed over ints and chars", but it is not exact, > because it makes think that it usually is used with such vars, but > could be used with doubles, longs... and not, they only work with ints > and chars, they must be used with ints and chars. Just like saying > "people usually flies with planes or helicopters", usually?, try to > fly yourself with a red cape, and then tell me if the word is only > usually. And in the "how to C/C++" the teaching of memory allocation > is awful (the C functions there, malloc, calloc, realloc and free), it > sem harder than quantum physics but is easier than 2+2 (or perhaps my > english is the cause). > |
|
From: Per W. <pw...@ia...> - 2002-08-13 06:40:06
|
The attached template is one I found somewhere and have been using. Besides the contents of the template, I had to add the following: Includes=3DC:\usr\src\wx2dev\wxWindows\include Libs=3DC:\usr\src\wx2dev\wxWindows\lib ResourceIncludes=3DC:\usr\src\wx2dev\wxWindows\include It seems to work quite fine for me with 2.2.9, 2.3.2 or the current CVS snapshot. /Per W On Mon, 12 Aug 2002, Alfredo Cole wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > El Lun 12 Ago 2002 09:10, Hongli Lai escribi=F3: > > On Sun, 2002-08-11 at 19:08, Alfredo Cole wrote: > > > I have compiled wxWindows 2.3.2 with mingw32 without any > > > problems. I have not been able to use it with DevC++5 though. I > > > think I read somebody was preparing a package for it, but I can > > > not find it at the web site. I'm porting an application from > > > Linux that needs 2.3.2 and would appreciate it if this was done. > > > > I don't understand why people want to use 2.3.2, the bleeding edge > > version. 2.2.9 is the latest stable version and works fine. >=20 > According to wxWindows developers, the "stable" version will not have=20 > any more features added to it. The "development" version is beeing=20 > worked on permanently and may, in fact, have fewer bugs that the=20 > so-called "stable" version. I have been using version 2.3.2 under=20 > Linux for over four months now, and have installed the system I=20 > developed in a rather large production environment (100+ users)=20 > without any problems. Many of the new features are needed by my=20 > system, and I now have to port it to Windows. >=20 > I agree that version 2.2.9 works fine if used outside of Dev-C++ 5,=20 > but will not behave correctly when the project grows beyond one=20 > source file and dialogs are created. I posted another message related=20 > to this subject a few minutes ago. I can compile the same project=20 > (with my own makefile) outside of Dev-C++ and it will compile=20 > correctly, using 2.2.9 (minus features) and 2.3.2 (with features=20 > enabled). >=20 > Just as you have made your point about using Delphi to develop=20 > Dev-C++, I think, with all due respect, that we should be allowed to=20 > use wxWindows 2.3.2 or future versions, if we find we need the new=20 > features. If you would point out the way as to how to build a package=20 > for Dev-C++, I will look into it. >=20 > Thank you and best regards. >=20 > - --=20 > Alfredo J. Cole > http://www.acyc.com (Accounting Systems) > http://www.clshonduras.com (Linux Hardware) > PGP Key available from certserver.pgp.com > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org >=20 > iD8DBQE9V9dYu5DxuPWE298RAs4KAJ0dcXG27eXWtk22b/SyBkQFVslSCQCePOIp > p4H1ZmgwS/wv66xa0Go/5Ew=3D > =3DLb9B > -----END PGP SIGNATURE----- >=20 >=20 > ------------------------------------------------------- > 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 >=20 |
|
From: Ioannis V. <no...@ho...> - 2002-08-13 00:53:59
|
This has been around for years (i remember having read it while i was learning C) and i think it is good. :) http://bit.csc.lsu.edu/tutorial/ten-commandments/ten-commandments.html Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys |
|
From: Alvin T. <al...@th...> - 2002-08-12 20:10:47
|
sorry if this question has already been answered somewhere,
is there a way to use the dll's/lib's produced by DevCpp with Visual
C++? in other words, can i use DevCpp for the dll's i produce at work
and have others link to them with VC++? when i try (in VC++) to link to
the dll 'libmydll.a' (created by DevCpp) it can't find any of the
externals. i do notice there is a file 'libmydll.def' file made by
DevCpp which seems to have export information in it, but i don't know
how to use it (or if i can).
the method i'm using (in VC++) to try to compile against the dll is:
import headers
link against lib file (libmydll.a)
is this the right method?
any help would be greatly appreciated. if that can't be done, how do i
set up DevCpp to use the Visual C++ compiler?
thanks,
alvin
|
|
From: Danny A. <tam...@ms...> - 2002-08-12 18:55:11
|
Hey guys I was wondering what I have to do to add packages, like allegro, gl, fltk= et... I added the package tried to run just the basic allegro code and w= ouldn't compile a ton of linker errors. I tried adding the allegro inclu= de files in the complier options on the C++ include files line but still = the same thing. I guess I'm just not getting it again I'm pretty new to = all this stuff, I haven't used any compiler other than Dev-C++, the only = language I have tried to write in is C++ and I have been studying it for = about 5 months now and I'm wanting to do more than write in console and d= oing the basic. I know I still got a lot to learn in the basic but I wan= t to spice up my life with a little graphics and color if you know what I= mean. Thanks for any help Danny |
|
From: Alfredo C. <al...@cl...> - 2002-08-12 17:44:58
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El Lun 12 Ago 2002 11:15, Hongli Lai escribi=F3: > On Mon, 2002-08-12 at 17:42, Alfredo Cole wrote: > > According to wxWindows developers, the "stable" version will not > > have any more features added to it. The "development" version is > > beeing worked on permanently and may, in fact, have fewer bugs > > that the so-called "stable" version. > > But it also may have more bugs than the development version. > Isn't the stable version still maintained? Nearly every other open > source library out there have 2 versions: stable and > unstable/development. Only bugfixes go to the stable version. New > features go to the development version. Isn't WxWindows following > the same method? > When I complain about a problem with version 2.2.9, almost invariably=20 the advise is "This has been fixed in 2.3.2. Please upgrade.". So I=20 have. > > What are the most important new features in 2.3.2? In my particular case, I develop accounting systems. I use MySQL for=20 the large system and Xbase for our "light" version. In both cases,=20 beeing able to limit the amount of text that goes into a one-line=20 wxTextCtrl and tie it to the length of the field in the table is very=20 important. Version 2.3.2 now has a SetMaxLength method and an=20 EVT_TEXT_MAXLEN event that are very important. I could do this under=20 2.2.9 but it was very convoluted. Additionally, things like wxWindow->SetFocus() work the way they are=20 supposed to now, and many more. I also use wxDesigner for Linux and=20 Windows, and it has support for version 2.3.2. Other people may think other things are most important, but these are=20 but a few that I care most about. Thank you. Regards. - --=20 Alfredo J. Cole http://www.acyc.com (Accounting Systems) http://www.clshonduras.com (Linux Hardware) PGP Key available from certserver.pgp.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9V/Liu5DxuPWE298RAupZAJ45P6lSIGvkhtGYKPK33jcbdEuTEgCfYC2T EAIcEw5iABQUcOqFEJKu49g=3D =3DbKjw -----END PGP SIGNATURE----- |
|
From: Hongli L. <h....@ch...> - 2002-08-12 17:09:32
|
On Mon, 2002-08-12 at 17:42, Alfredo Cole wrote: > According to wxWindows developers, the "stable" version will not have > any more features added to it. The "development" version is beeing > worked on permanently and may, in fact, have fewer bugs that the > so-called "stable" version. But it also may have more bugs than the development version. Isn't the stable version still maintained? Nearly every other open source library out there have 2 versions: stable and unstable/development. Only bugfixes go to the stable version. New features go to the development version. Isn't WxWindows following the same method? What are the most important new features in 2.3.2? |
|
From: Alfredo C. <al...@cl...> - 2002-08-12 15:47:20
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El Lun 12 Ago 2002 09:10, Hongli Lai escribi=F3: > On Sun, 2002-08-11 at 19:08, Alfredo Cole wrote: > > I have compiled wxWindows 2.3.2 with mingw32 without any > > problems. I have not been able to use it with DevC++5 though. I > > think I read somebody was preparing a package for it, but I can > > not find it at the web site. I'm porting an application from > > Linux that needs 2.3.2 and would appreciate it if this was done. > > I don't understand why people want to use 2.3.2, the bleeding edge > version. 2.2.9 is the latest stable version and works fine. According to wxWindows developers, the "stable" version will not have=20 any more features added to it. The "development" version is beeing=20 worked on permanently and may, in fact, have fewer bugs that the=20 so-called "stable" version. I have been using version 2.3.2 under=20 Linux for over four months now, and have installed the system I=20 developed in a rather large production environment (100+ users)=20 without any problems. Many of the new features are needed by my=20 system, and I now have to port it to Windows. I agree that version 2.2.9 works fine if used outside of Dev-C++ 5,=20 but will not behave correctly when the project grows beyond one=20 source file and dialogs are created. I posted another message related=20 to this subject a few minutes ago. I can compile the same project=20 (with my own makefile) outside of Dev-C++ and it will compile=20 correctly, using 2.2.9 (minus features) and 2.3.2 (with features=20 enabled). Just as you have made your point about using Delphi to develop=20 Dev-C++, I think, with all due respect, that we should be allowed to=20 use wxWindows 2.3.2 or future versions, if we find we need the new=20 features. If you would point out the way as to how to build a package=20 for Dev-C++, I will look into it. Thank you and best regards. - --=20 Alfredo J. Cole http://www.acyc.com (Accounting Systems) http://www.clshonduras.com (Linux Hardware) PGP Key available from certserver.pgp.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9V9dYu5DxuPWE298RAs4KAJ0dcXG27eXWtk22b/SyBkQFVslSCQCePOIp p4H1ZmgwS/wv66xa0Go/5Ew=3D =3DLb9B -----END PGP SIGNATURE----- |
|
From: Hongli L. <h....@ch...> - 2002-08-12 15:04:29
|
On Sun, 2002-08-11 at 19:08, Alfredo Cole wrote: > I have compiled wxWindows 2.3.2 with mingw32 without any problems. I > have not been able to use it with DevC++5 though. I think I read > somebody was preparing a package for it, but I can not find it at the > web site. I'm porting an application from Linux that needs 2.3.2 and > would appreciate it if this was done. > I don't understand why people want to use 2.3.2, the bleeding edge version. 2.2.9 is the latest stable version and works fine. |
|
From: Alfredo C. <al...@cl...> - 2002-08-12 14:58:55
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi: I'm using Dev-C++ 4.9.5 and wxWindows 2.2.9, Win98SE. If I don't add a new dialog to my program, everything works fine. As soon as I add a dialog (using wxDesigner for Windows), I get the error mentioned in the subject line, even though that file is present. Compiling the project with a makefile I wrote from a DOS box, using gcc 2.95.2 works fine. Has anybody put together a working package for wxWindows? It would be preferable if it was version 2.3.2. Thank you. Regards. - -- Alfredo J. Cole http://www.acyc.com (Accounting Systems) http://www.clshonduras.com (Linux Hardware) PGP Key available from certserver.pgp.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9V8v/u5DxuPWE298RAsrNAJ4yQ7AJ0IRUTAuBmlxVFugfzceI5QCfWQyk dnsKXpg7SFYmZMxZRX+foOo= =/wIn -----END PGP SIGNATURE----- |
|
From: Alfredo C. <al...@cl...> - 2002-08-12 13:33:09
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El Vie 09 Ago 2002 09:00, e.leon2 escribi=F3: > Is it planned to make a package with the last wxWindows (2.3.2) ? > I tried to compile it with mingw32, but I get errors... > ------------------------------------------ I have compiled wxWindows 2.3.2 with mingw32 without any problems. I=20 have not been able to use it with DevC++5 though. I think I read=20 somebody was preparing a package for it, but I can not find it at the=20 web site. I'm porting an application from Linux that needs 2.3.2 and=20 would appreciate it if this was done. Regards. - --=20 Alfredo J. Cole http://www.acyc.com (Accounting Systems) http://www.clshonduras.com (Linux Hardware) PGP Key available from certserver.pgp.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9Vpo5u5DxuPWE298RAnUFAJ4gTfKaIk6tA5cXB/7FB4F++2QUOwCfdC2W U8rT0AvapneLIgIT7NXPID0=3D =3D2OxB -----END PGP SIGNATURE----- |
|
From: Ioannis V. <no...@ho...> - 2002-08-11 19:26:53
|
<http://run.to/noicys>=20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Carlos Garc=EDa del Monte Sent: Sunday, August 11, 2002 9:53 PM To: dev-cpp-users-list Subject: Re: [Dev-C++] newbie questions without answer =20 The code post is only a part, talking about the files he gave (perhaps you didn't receive the files?). =20 =20 Nope, i did not receive any attachment. Thanks for the info. Now lets answer to the original poster: =20 =20 I wrote principally for him, but as you want see all, here is the code:=20 The code for the struct thing (newbiequestion.cpp) is:=20 #include <iostream>=20 #include <stdlib.h>=20 #include <string.h>=20 struct date{=20 int month;=20 int day;=20 int year;=20 };=20 struct employ{=20 char *first;=20 char *second;=20 date eyear; /*i want to use a reference to the year in the first struct=20 but then i get an error message from the compiler since i didn't=20 =20 You can use a reference provided that you have a date object and a constructor for struct employ.=20 =20 E.g.: =20 struct date{=20 int month;=20 int day;=20 int year;=20 };=20 =20 struct employ{=20 char *first;=20 char *second;=20 int &eyear; =20 employ(char *f, char *s, int &y):first(f), second(s), eyear(y) {} }; =20 int main() { date d; =20 employ e(new char, new char, d.year); } =20 =20 Just for the record, i do not like the approach you are using, it is too C-style. =20 =20 =20 };=20 int main()=20 {=20 date d;=20 employ e;=20 d.day=3D30;=20 d.month=3D8;=20 d.year=3D1982;=20 e.eyear =3D d;=20 e.first=3Dnew char [strlen("senem")]; // a way of doing this shortly?? =20 =20 Using a constructor and standard library facilities like std::string. If you do not use a reference mentioned previously, you could use an initializer list but it is too naked. =20 =20 e.second=3Dnew char [strlen("beken")];=20 e.first=3D"senem";=20 e.second=3D"beken";=20 cout<<e.first<<" "<<e.second<<endl;=20 cout<<"birthday:\n"=20 <<e.eyear.day<<"/"<<e.eyear.month<<"/"<<e.eyear.year<<endl;=20 system("PAUSE");=20 return 0;=20 }=20 Another is the stringclas.cpp file which source is:=20 #include <iostream>=20 #include <stdlib.h>=20 #include <cassert>=20 #include <string.h>=20 #include <iomanip.h>=20 class string{=20 friend ostream &operator<<(ostream &,const string&);=20 friend istream &operator>>(istream &,string&);=20 public:=20 string(const char * =3D"");=20 string(const string &);=20 ~string();=20 const string &operator=3D(const string &);=20 const string &operator+=3D(const string &);=20 bool operator!()const;=20 bool operator=3D=3D(const string&)const;=20 bool operator<(const string&)const;=20 bool operator!=3D(const string& right)const=20 {return !(*this=3D=3Dright);}=20 bool operator>(const string& right)const=20 {return (right<*this);}=20 bool operator<=3D(const string& right)const=20 {return !(right<*this);}=20 bool operator>=3D(const string& right)const=20 {return !(*this<right);}=20 char &operator[](int);=20 const char &operator[](int)const;=20 string operator()(int,int);=20 int getlength()const;=20 private:=20 int length;=20 char * sptr;=20 void setstring(const char*);=20 };=20 string::string(const char *s):length(strlen(s)){=20 cout<<"conversion constructor :"<<s<<"\n";=20 setstring(s);=20 }=20 string::string(const string©):length(copy.length){=20 cout<<"copy constructor: "<<copy.sptr<<"\n";=20 setstring(copy.sptr);=20 }=20 string::~string(){=20 cout<<"destructor: "<<sptr<<"\n";=20 delete[]sptr;=20 }=20 const string &string::operator=3D(const string &right){ //burda nie ref var??=20 cout<<"operator=3D called\n";=20 if(&right!=3Dthis){=20 delete[]sptr;=20 length=3Dright.length;=20 setstring(right.sptr);=20 }=20 else=20 cout<<"attempted assignment of a string to itself\n";=20 return *this;=20 }=20 const string &string::operator+=3D(const string &right){=20 char *string1=3Dnew char[length+right.length+1]; ///DON'T MODIFY THE SIZE=20 strcpy(string1,sptr); /* i tried to change this part a little=20 so that the first string is not modified,but then=20 the program started to terminate abnormally=20 and i have absolute no idea what i did wrong!! here is the original: =20 =20 What kind of abnormal termination. assert()?=20 char *tempptr=3Dsptr;=20 lenght+=3Dright.length;=20 sptr=3Dnew char [length+1];=20 assert(sptr!=3D0);=20 strcpy(sptr,tempptr);=20 strcat(sptr,right.ptr);=20 delete[]tempptr;=20 return *this;*/ =20 =20 =20 I must mention that C++ provides already a string type defined in <string>. So why do you bother? :)=20 =20 =20 Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/>=20 * Alternative URL: http://run.to/noicys =20 |
|
From: Carlos d. M. <cg...@wo...> - 2002-08-11 18:57:43
|
The code post is only a part, talking about the files he gave (perhaps
you didn't receive the files?).
I wrote principally for him, but as you want see all, here is the code:
The code for the struct thing (newbiequestion.cpp) is:
#include <iostream>
#include <stdlib.h>
#include <string.h>
struct date{
int month;
int day;
int year;
};
struct employ{
char *first;
char *second;
date eyear; /*i want to use a reference to the year in the first
struct
but then i get an error message from the compiler since i
didn't
initialize eyear!! how am i to get rid of this
problem??*/
};
int main()
{
date d;
employ e;
d.day=3D30;
d.month=3D8;
d.year=3D1982;
e.eyear =3D d;
e.first=3Dnew char [strlen("senem")]; // a way of doing this
shortly??
e.second=3Dnew char [strlen("beken")];
e.first=3D"senem";
e.second=3D"beken";
cout<<e.first<<" "<<e.second<<endl;
cout<<"birthday:\n"
<<e.eyear.day<<"/"<<e.eyear.month<<"/"<<e.eyear.year<<endl;
system("PAUSE");
return 0;
}
Another is the stringclas.cpp file which source is:
#include <iostream>
#include <stdlib.h>
#include <cassert>
#include <string.h>
#include <iomanip.h>
class string{
friend ostream &operator<<(ostream &,const string&);
friend istream &operator>>(istream &,string&);
public:
string(const char * =3D"");
string(const string &);
~string();
const string &operator=3D(const string &);
const string &operator+=3D(const string &);
bool operator!()const;
bool operator=3D=3D(const string&)const;
bool operator<(const string&)const;
bool operator!=3D(const string& right)const
{return !(*this=3D=3Dright);}
bool operator>(const string& right)const
{return (right<*this);}
bool operator<=3D(const string& right)const
{return !(right<*this);}
bool operator>=3D(const string& right)const
{return !(*this<right);}
char &operator[](int);
const char &operator[](int)const;
string operator()(int,int);
int getlength()const;
private:
int length;
char * sptr;
void setstring(const char*);
};
string::string(const char *s):length(strlen(s)){
cout<<"conversion constructor :"<<s<<"\n";
setstring(s);
}
string::string(const string©):length(copy.length){
cout<<"copy constructor: "<<copy.sptr<<"\n";
setstring(copy.sptr);
}
string::~string(){
cout<<"destructor: "<<sptr<<"\n";
delete[]sptr;
}
const string &string::operator=3D(const string &right){ //burda nie ref
var??
cout<<"operator=3D called\n";
if(&right!=3Dthis){
delete[]sptr;
length=3Dright.length;
setstring(right.sptr);
}
else
cout<<"attempted assignment of a string to itself\n";
return *this;
}
const string &string::operator+=3D(const string &right){
char *string1=3Dnew char[length+right.length+1]; ///DON'T MODIFY THE
SIZE
strcpy(string1,sptr); /* i tried to change this part a little
so that the first string is not modified,but
then
the program started to terminate abnormally
and i have absolute no idea what i did wrong!!
here is the original:
char *tempptr=3Dsptr;
lenght+=3Dright.length;
sptr=3Dnew char [length+1];
assert(sptr!=3D0);
strcpy(sptr,tempptr);
strcat(sptr,right.ptr);
delete[]tempptr;
return *this;*/
strcat(string1,right.sptr);
}
bool string::operator!()const{return length=3D=3D0;}
bool string::operator=3D=3D(const string &right)const
{return strcmp(sptr,right.sptr)=3D=3D0;}
bool string::operator<(const string &right)const
{return strcmp(sptr,right.sptr)<0;}
char &string::operator[](int subscript){
assert(subscript>=3D0&&subscript<length);
return sptr[subscript];
}
const char &string::operator[](int subscript)const{
assert (subscript>=3D0&&subscript<length);
return sptr[subscript];
}
string string::operator()(int index,int sublength){
assert(index>=3D0&&index<length&&sublength>=3D0);
int len;
if((sublength=3D=3D0)||(index+sublength))
len=3Dlength-index;
else
len=3Dsublength;
char *tempptr=3Dnew char[len+1];
assert(tempptr!=3D0);
strncpy(tempptr,&sptr[index],len);
tempptr[len]=3D'\0';
string tempstring(tempptr);
delete[]tempptr;
return tempstring;
}
int string::getlength()const{return length;}
void string::setstring(const char *string2){
sptr=3Dnew char[length+1];
assert(sptr!=3D0);
strcpy(sptr,string2);
}
ostream &operator<<(ostream &output,const string &s){
output<<s.sptr;
return output;
}
istream &operator>>(istream &input,string &s){
char temp[100];
input>>setw(100)>>temp;
s=3Dtemp;
return input;
}
int main()
{
string s1("happy"),s2("birthday"),s3;
cout<<"s1 is\""<<s1<<"\";s2 is\""<<s2
<<"\";s3 is\""<<s3<<'\"'
<<"\n the results of comparing s2 and s1:"
<<"\ns2=3D=3Ds1 yields"
<<(s2=3D=3Ds1?"true":"false")
<<"\ns2!=3Ds1 yields "
<<(s2!=3Ds1 ?"true":"false")
<<"\ns2>s1 yields "
<<(s2>s1?"true":"false")
<<"\ns2<s1 yields "
<<(s2<s1 ?"true":"false")
<<"\ns2>=3Ds1 yields "
<<(s2>=3Ds1 ?"true":"false")
<<"\ns2<=3Ds1 yields "
<<(s2<=3Ds1?"true":"false");
cout<<"\n\n testing !s3:\n";
if(!s3){
cout<<"s3 is empty,assigning s1 to s3;\n";
s3=3Ds1;
cout<<"s3 is\""<<s3<<"\"";
}
cout<<"\n\n s1+=3Ds2 yields s1=3D";
s1+=3Ds2;
cout<<s1;
cout<<"\n\n s1+=3D\"to you\"yields\n";
s1+=3D"to you";
cout<<"s1 =3D "<<s1<<"\n\n";
cout<<"the substring od s1 starting at\n"
<<"location 0 for 14 characters,s1(0,14),is:\n"
<<s1(0,14)<<"\n\n";
cout<<"the substring of s1 starting at \n"
<<"loaction 15,s1(15,0),is:" //<- 15 , which is out of
bounds due to the +=3D modification
<<s1(15,0)<<"\n\n";
string *s4ptr=3Dnew string(s1);
cout<<"s4ptr =3D"<<*s4ptr<<"\n\n";
cout<<"assigning *s4ptr to *s4ptr\n";
*s4ptr=3D*s4ptr;
cout<<"*s4ptr=3D "<<*s4ptr<<"\n";
delete s4ptr;
s1[0]=3D'H';
s1[6]=3D'B';
cout<<"\n s1 after s1[0]=3D'H' and s1[6]=3D'B' is: "
<<s1<<"\n\n";
system("PAUSE");
return 0;
}
Ioannis Vranos escribi=F3:
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Carlos
> Garc=EDa del Monte
> Sent: Sunday, August 11, 2002 3:49 PM
> To: dev-cpp-users-list
> Subject: Re: [Dev-C++] newbie questions without answer
>
>
>
> newbiequestion.cpp
>
> struct employ{
> char *first;
> char *second;
> date eyear; /*i want to use a reference to the year in
> the first struct
>
> I do not see any reference here. Also what first struct?
>
>
> but then i get an error message from the
> compiler since i didn't
> initialize eyear!! how am i to get rid of
> this problem??*/
>
> Provide a default constructor or default arguments to the provided
> constructor.
>
>
> I have no problems compiling it.
> employvar.eyear.(day/month/year)=3D x;
>
> That's a bit strange.
>
> Or
> date *eyear
> employvar.eyear->day=3Dx.
>
> Or
> date *eyear; in employer struct.
> datevar.day =3D x;
> employvar.eyear =3D datevar;
> Or datevar.day=3Dx;
> datevar.eyear =3D &datevar;
>
> I hope you know what you are doing in the above.
>
> The other question about shorter way. I don't understand.
>
> In the stringclass what happens is that when you modify the
> +=3D operator, so the string of the left hand string object is
> no midified you make that neither it size is modified
> (evidently), but then, ine the code, at line 178 - 190, the
> code assumes that function has not been changed (you did not
> adapted it to your modifications), so as it wants to output
> the substrings from a subscript to another position, and the
> positions are not found through object's functions, they are
> put ad hoc, the code at this lines are intended so you had
> just added s2 to s1, so s1 is "happy birthday to you", which
> has 21 characters, and there the code is "substring from 0,
> 14 and after from 15, 0", which are ranges that would be in
> s1, but you modified it in a way such now s1 is "happy",
> five chars, so when you ask for range 15,0 you're giving a
> range which is out of the bounds of s1.
>
> The burda nie ref var, that's the way....
>
> I am not good at understanding technical problems from text. Please
> provide some example code with comments.
> Ioannis
>
> * Ioannis Vranos
> * Programming pages: http://www.noicys.cjb.net* Alternative URL:
> http://run.to/noicys
>
|
|
From: Ioannis V. <no...@ho...> - 2002-08-11 16:03:12
|
<http://run.to/noicys>=20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Carlos Garc=EDa del Monte Sent: Sunday, August 11, 2002 3:49 PM To: dev-cpp-users-list Subject: Re: [Dev-C++] newbie questions without answer =20 newbiequestion.cpp=20 struct employ{=20 char *first;=20 char *second;=20 date eyear; /*i want to use a reference to the year in the first struct =20 I do not see any reference here. Also what first struct? =20 =20 but then i get an error message from the compiler since i didn't=20 initialize eyear!! how am i to get rid of this problem??*/=20 =20 Provide a default constructor or default arguments to the provided constructor. =20 =20 I have no problems compiling it.=20 employvar.eyear.(day/month/year)=3D x; =20 That's a bit strange. =20 =20 Or=20 date *eyear=20 employvar.eyear->day=3Dx.=20 Or=20 date *eyear; in employer struct.=20 datevar.day =3D x;=20 employvar.eyear =3D datevar;=20 Or datevar.day=3Dx;=20 datevar.eyear =3D &datevar; =20 I hope you know what you are doing in the above. =20 =20 The other question about shorter way. I don't understand.=20 In the stringclass what happens is that when you modify the +=3D = operator, so the string of the left hand string object is no midified you make that neither it size is modified (evidently), but then, ine the code, at line 178 - 190, the code assumes that function has not been changed (you did not adapted it to your modifications), so as it wants to output the substrings from a subscript to another position, and the positions are not found through object's functions, they are put ad hoc, the code at this lines are intended so you had just added s2 to s1, so s1 is "happy birthday to you", which has 21 characters, and there the code is "substring from 0, 14 and after from 15, 0", which are ranges that would be in s1, but you modified it in a way such now s1 is "happy", five chars, so when you ask for range 15,0 you're giving a range which is out of the bounds of s1.=20 The burda nie ref var, that's the way.... =20 I am not good at understanding technical problems from text. Please provide some example code with comments. =20 =20 =20 Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/>=20 * Alternative URL: http://run.to/noicys |
|
From: Mark B. <jmb...@ea...> - 2002-08-11 15:55:59
|
Thank you. I wonder why I can't find the template? Weird. Mark Brooks > -----Original Message----- > From: Hongli Lai [mailto:h....@ch...] > Sent: Sunday, August 11, 2002 6:01 AM > To: Mark Brooks > Cc: dev...@li... > Subject: RE: [Dev-C++] Problem linking simple GTK+ prog with Dev-Cpp > 4.9.5.0 > > > On Sun, 2002-08-11 at 01:53, Mark Brooks wrote: > > There doesn't appear to get a GTK+ template. Why would that > solve linker > > problems? > > Because the template includes the nescessery compiler and linker flags, > as well as example code. After all. that's what templates are all about! > > Compiler flags: > -I"<INCLUDE>\gtk-2.0" -I"<INCLUDE>\gtkdeps-2.0" > -I"<LIB>\gtk-2.0\include" -I"<INCLUDE>\atk-1.0" -I"<INCLUDE>\pango-1.0" > -I"<INCLUDE>\glib-2.0" -I"<LIB>\glib-2.0" -I"<LIB>\glib-2.0\include" > -fnative-struct > > Linker flags: > -lgtk-win32-2.0 -lgdk-win32-2.0 -limm32 -lshell32 -lole32 -luuid > -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangowin32-1.0 -lgdi32 -lpango-1.0 > -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -liconv -lintl -mno-cygwin > -fnative-struct > > |
|
From: Carlos d. M. <cg...@wo...> - 2002-08-11 15:55:08
|
In overload (I have just found where I sent it)you type //bu ne? int the overloading of the subscript overload. I understand it as saying "Overload it for this? This does nothing an array do". Wrong, the key of that overload is the assert before the return, it makes sure the subscript given is inside the valid range of the array. The first version returns a variable which you'll can change, and the second a const variable. |
|
From: Carlos d. M. <cg...@wo...> - 2002-08-11 12:54:11
|
newbiequestion.cpp
struct employ{
char *first;
char *second;
date eyear; /*i want to use a reference to the year in the first
struct
but then i get an error message from the compiler since i
didn't
initialize eyear!! how am i to get rid of this
problem??*/
I have no problems compiling it.
employvar.eyear.(day/month/year)= x;
Or
date *eyear
employvar.eyear->day=x.
Or
date *eyear; in employer struct.
datevar.day = x;
employvar.eyear = datevar;
Or datevar.day=x;
datevar.eyear = &datevar;
The other question about shorter way. I don't understand.
In the stringclass what happens is that when you modify the += operator,
so the string of the left hand string object is no midified you make
that neither it size is modified (evidently), but then, ine the code, at
line 178 - 190, the code assumes that function has not been changed (you
did not adapted it to your modifications), so as it wants to output the
substrings from a subscript to another position, and the positions are
not found through object's functions, they are put ad hoc, the code at
this lines are intended so you had just added s2 to s1, so s1 is "happy
birthday to you", which has 21 characters, and there the code is
"substring from 0, 14 and after from 15, 0", which are ranges that would
be in s1, but you modified it in a way such now s1 is "happy", five
chars, so when you ask for range 15,0 you're giving a range which is
out of the bounds of s1.
The burda nie ref var, that's the way....
|
|
From: Jorge A. <jor...@ho...> - 2002-08-11 11:07:16
|
http://www.cs.colorado.edu/~main/bgi/ |
|
From: Hongli L. <h....@ch...> - 2002-08-11 09:55:16
|
On Sun, 2002-08-11 at 01:53, Mark Brooks wrote: > There doesn't appear to get a GTK+ template. Why would that solve linker > problems? Because the template includes the nescessery compiler and linker flags, as well as example code. After all. that's what templates are all about! Compiler flags: -I"<INCLUDE>\gtk-2.0" -I"<INCLUDE>\gtkdeps-2.0" -I"<LIB>\gtk-2.0\include" -I"<INCLUDE>\atk-1.0" -I"<INCLUDE>\pango-1.0" -I"<INCLUDE>\glib-2.0" -I"<LIB>\glib-2.0" -I"<LIB>\glib-2.0\include" -fnative-struct Linker flags: -lgtk-win32-2.0 -lgdk-win32-2.0 -limm32 -lshell32 -lole32 -luuid -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -liconv -lintl -mno-cygwin -fnative-struct |
|
From: <mo...@ju...> - 2002-08-11 08:16:54
|
The following works OK in Borland C++ 4.52 running under Windows 95, but
Dev-C++ doesn't like it. How do I get to play my wav files in later
Windows versions?
sndPlaySound("hello.wav",SND_ASYNC);
AB
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/web/.
|
|
From: Abhijit S. <mu...@gm...> - 2002-08-11 08:09:59
|
> When all else fails, read the instructions -- in this case the FAQ file. > I put my peripheral files in the BIN directory, & most of my problems > disappeared. But isn't this something that should be fixed? Shouldn't > all files in a given project go into the same directory? Try specifying the full path in the resource file, like so: ID_MAINICON ICON "d:/my_path/wherever/icon.ico" |
|
From: <mo...@ju...> - 2002-08-11 06:45:45
|
When all else fails, read the instructions -- in this case the FAQ file. I put my peripheral files in the BIN directory, & most of my problems disappeared. But isn't this something that should be fixed? Shouldn't all files in a given project go into the same directory? Allan ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. |
|
From: <mo...@ju...> - 2002-08-11 05:08:17
|
I've been on Mars for the last 6 years, so I seem to have fallen behind the inevitable march of programming progress. Specifically, I have several programs, compiled under Borland C++ 4.52, which ran fine under Windows 95 but are balking under Dev-C++. Perhaps there is some kind soul who has compiled, & would share with me, a checklist of modifications that would need to be made before my programs would run under Windows 98 & successors. My most immediate problem is the compiler's stubborn inability to locate peripheral files like bitmaps & icons. Also, I would welcome any suggestions re reference books, like a comprehensive API manual & a lucid textbook/cookbook. Thanks a lot. Allan ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. |
|
From: Mark B. <jmb...@ea...> - 2002-08-10 23:53:07
|
There doesn't appear to get a GTK+ template. Why would that solve linker problems? There does appear to be a wxWindows template. Mark Brooks |
|
From: <pi...@fr...> - 2002-08-10 21:46:20
|
ok ----- Message d'origine ----- De : <dev...@li...> À : <dev...@li...> Envoyé : samedi 10 août 2002 19:18 Objet : Dev-cpp-users digest, Vol 1 #918 - 14 msgs > 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: Stupid question (jansb000) > 2. RE: Stupid question (Rob) > 3. RE: Stupid question (Ioannis Vranos) > 4. Re[2]: [Dev-C++] Stupid question (Zodiaq) > 5. RE: Re[2]: [Dev-C++] Stupid question (Ioannis Vranos) > 6. timers (Ramana Kumar) > 7. Re: Re[2]: [Dev-C++] monitoring traffic, how? (A.Klingenstein) > 8. Problem linking simple GTK+ prog with Dev-Cpp 4.9.5.0 (Mark Brooks) > 9. Re[4]: [Dev-C++] monitoring traffic, how? (Zodiaq) > 10. forget... (Zodiaq) > 11. RE: Problem linking simple GTK+ prog with Dev-Cpp 4.9.5.0 (Mark Brooks) > 12. Re: Problem linking simple GTK+ prog with Dev-Cpp 4.9.5.0 (Hongli Lai) > 13. graphics.h (Where Do i Get It) (Garrett Bratvold) > 14. Re: graphics.h (Where Do i Get It) (Hongli Lai) > > --__--__-- > > Message: 1 > From: "jansb000" <jan...@pl...> > To: "Jim Watters" <ma...@em...>, > <dev...@li...> > Subject: Re: [Dev-C++] Stupid question > Date: Fri, 9 Aug 2002 23:15:43 +0200 > > This is my program: I still have the problem ([linker error] undefined > reference to 'cout')! > > #include <iostream> > #include <stdlib.h> > > using namespace std; > > int main(int argc, char *argv[]) { > cout << "hello" << "\n"; > system("PAUSE"); > return 0; > } > > ----- Original Message ----- > From: "Jim Watters" <ma...@em...> > To: <dev...@li...> > Sent: Wednesday, August 07, 2002 3:11 PM > Subject: RE: [Dev-C++] Stupid question > > > > -----Original Message----- > > From: Jim Watters > > > > #include <iostream.h> > > > > ;-) > > > > -----Original Message----- > > From: Ioannis Vranos > > > > #include <iostream> > > > > using namespace std; > > > > :) > > > > -----New Message----- > > > > You mean :) must be used instead of ;-)? > > > > Thanks. I'm used to C and doing things "the old way". > > > > :) > > > > Jim > > > > > > > > > > ------------------------------------------------------- > > 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 > > > > --__--__-- > > Message: 2 > From: "Rob" <ro...@us...> > To: <dev...@li...> > Subject: RE: [Dev-C++] Stupid question > Date: Fri, 9 Aug 2002 16:37:42 -0500 > > I pasted your code into a blank file and compiled/executed it without > problem. > > Rob > > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...]On Behalf Of jansb000 > > Sent: Friday, August 09, 2002 4:16 PM > > To: Jim Watters; dev...@li... > > Subject: Re: [Dev-C++] Stupid question > > > > > > This is my program: I still have the problem ([linker error] undefined > > reference to 'cout')! > > > > #include <iostream> > > #include <stdlib.h> > > > > using namespace std; > > > > int main(int argc, char *argv[]) { > > cout << "hello" << "\n"; > > system("PAUSE"); > > return 0; > > } > > > > ----- Original Message ----- > > From: "Jim Watters" <ma...@em...> > > To: <dev...@li...> > > Sent: Wednesday, August 07, 2002 3:11 PM > > Subject: RE: [Dev-C++] Stupid question > > > > > > > -----Original Message----- > > > From: Jim Watters > > > > > > #include <iostream.h> > > > > > > ;-) > > > > > > -----Original Message----- > > > From: Ioannis Vranos > > > > > > #include <iostream> > > > > > > using namespace std; > > > > > > :) > > > > > > -----New Message----- > > > > > > You mean :) must be used instead of ;-)? > > > > > > Thanks. I'm used to C and doing things "the old way". > > > > > > :) > > > > > > Jim > > > > > > > > > > > > > > > ------------------------------------------------------- > > > 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 > > > > > > > > ------------------------------------------------------- > > 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 > > > > > --__--__-- > > Message: 3 > From: "Ioannis Vranos" <no...@ho...> > To: <dev...@li...> > Subject: RE: [Dev-C++] Stupid question > Date: Sat, 10 Aug 2002 00:53:12 +0300 > > Your code is valid, you should not get any errors, although it could be > written better: > > #include <iostream> > #include <cstdlib> > > > int main() { > > using namespace std; > > cout << "hello" << "\n"; > system("PAUSE"); > > return 0; > } > > > Ioannis > > * Ioannis Vranos > * Programming pages: http://www.noicys.cjb.net > * Alternative URL: http://run.to/noicys > > > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...] On Behalf > > Of jansb000 > > Sent: Saturday, August 10, 2002 12:16 AM > > To: Jim Watters; dev...@li... > > Subject: Re: [Dev-C++] Stupid question > > > > > > This is my program: I still have the problem ([linker error] undefined > > reference to 'cout')! > > > > #include <iostream> > > #include <stdlib.h> > > > > using namespace std; > > > > int main(int argc, char *argv[]) { > > cout << "hello" << "\n"; > > system("PAUSE"); > > return 0; > > } > > > > ----- Original Message ----- > > From: "Jim Watters" <ma...@em...> > > To: <dev...@li...> > > Sent: Wednesday, August 07, 2002 3:11 PM > > Subject: RE: [Dev-C++] Stupid question > > > > > > > -----Original Message----- > > > From: Jim Watters > > > > > > #include <iostream.h> > > > > > > ;-) > > > > > > -----Original Message----- > > > From: Ioannis Vranos > > > > > > #include <iostream> > > > > > > using namespace std; > > > > > > :) > > > > > > -----New Message----- > > > > > > You mean :) must be used instead of ;-)? > > > > > > Thanks. I'm used to C and doing things "the old way". > > > > > > :) > > > > > > Jim > > > > > > > > > > > > > > > ------------------------------------------------------- > > > 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 > > > > > > > > ------------------------------------------------------- > > 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 > > > > > --__--__-- > > Message: 4 > Date: Sat, 10 Aug 2002 00:40:22 +0200 > From: Zodiaq <zo...@ac...> > Reply-To: Zodiaq <zo...@ac...> > Organization: Earth > To: Dev...@li... > Subject: Re[2]: [Dev-C++] Stupid question > > Hello Ioannis and all Dev-C++ users, > > Friday, August 9, 2002, 11:53:12 PM, Ioannis wrote as follows: > > IV> Your code is valid, you should not get any errors, although it could be > IV> written better: > > IV> #include <iostream> > IV> #include <cstdlib> > > > IV> int main() { > > IV> using namespace std; > > IV> cout << "hello" << "\n"; > IV> system("PAUSE"); > > Ain't that better to use cin.ignore() instead of cstdlib and > system("PAUSE") ?? > > IV> return 0; > IV> } > > > IV> Ioannis > > IV> * Ioannis Vranos > IV> * Programming pages: http://www.noicys.cjb.net > IV> * Alternative URL: http://run.to/noicys > > that are just my two grosze... > -- > regards, Zodiaq > > > > --__--__-- > > Message: 5 > From: "Ioannis Vranos" <no...@ho...> > To: <Dev...@li...> > Subject: RE: Re[2]: [Dev-C++] Stupid question > Date: Sat, 10 Aug 2002 01:45:45 +0300 > > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...] On Behalf Of Zodiaq > > Sent: Saturday, August 10, 2002 1:40 AM > > To: Dev...@li... > > Subject: Re[2]: [Dev-C++] Stupid question > > > > > > Hello Ioannis and all Dev-C++ users, > > > > Friday, August 9, 2002, 11:53:12 PM, Ioannis wrote as follows: > > > > IV> Your code is valid, you should not get any errors, > > although it could be > > IV> written better: > > > > IV> #include <iostream> > > IV> #include <cstdlib> > > > > > > IV> int main() { > > > > IV> using namespace std; > > > > IV> cout << "hello" << "\n"; > > IV> system("PAUSE"); > > > > Ain't that better to use cin.ignore() instead of cstdlib and > > system("PAUSE") ?? > > > Yes that would be more portable. > > > > > that are just my two grosze... > > -- > > regards, Zodiaq > > > Ioannis hands to Zodiaq 2 euro-grosze. > > > Ioannis > > * Ioannis Vranos > * Programming pages: http://www.noicys.cjb.net > * Alternative URL: http://run.to/noicys > > > --__--__-- > > Message: 6 > From: "Ramana Kumar" <ra...@my...> > To: "C++" <dev...@li...> > Date: Sat, 10 Aug 2002 21:13:50 +1000 > Subject: [Dev-C++] timers > > Hi, I have a problem concerning timers in windows. > I am using only win32 API, and i use the fuction: > > SetTimer(hwnd,id,len*100,NULL); > //hwnd is the HWND of the window, id is a UINT, len is a UINT > > to set a timer that will later send a WM_TIMER message to my WindowProc. In > my WindowProc i have code like this: > > case WM_TIMER: > { > myclass->blah(); > return 0; > } > //myclass is a pointer to an object with a function called blah > > and the function blah sets bool thebool to the value false. > > in the function that calls SetTimer, i later have the code: > > thebool = true; > while(thebool) > { > MessageBox(hwnd,"WAITING","ERROR",MB_OK); //this gets deleted > } > > when i run the program, the messagebox comes up a number of times until > len*100 milliseconds has passed, then it resumes normal operation. > The problem is, i do not want to have to put up this messagebox. So i delete > the code for it. Once i do this, it seems the WM_TIMER message is never sent > for some reason. even if a put a messagebox in the case WM_TIMER: section, > it is never shown, unless i keep the messagbox in the while loop. > what is the meaning of this? > how am i using the timer wrongly? > thanks in advance > ramana > ps i also tried putting WaitMessage(); in the while loop instead, but it has > no effect. > > > > --__--__-- > > Message: 7 > Date: Sat, 10 Aug 2002 13:45:19 +0200 > From: A.Klingenstein <kli...@we...> > To: Dev...@li... > Subject: Re: Re[2]: [Dev-C++] monitoring traffic, how? > > On Thu, 8 Aug 2002 11:31:45 +0200 > Zodiaq <zo...@ac...> wrote: > > Yeah, I know about that, and I know about perfmon... but I just want > > write something similar by my own - something to show me bytes > > received and send, nothing more... so I have to build driver for that? > > Or are there any simplier methods? > > You don´t need a driver for getting this info. There are numerous small > applications which give you that info, some with source, like: > http://gamma.nic.fi/~rainy/Rainmeter.html which is extensible by your own > plugins and is GPLed. > > Alex > > > --__--__-- > > Message: 8 > From: "Mark Brooks" <jmb...@ea...> > To: <dev...@li...> > Date: Sat, 10 Aug 2002 08:55:48 -0400 > Subject: [Dev-C++] Problem linking simple GTK+ prog with Dev-Cpp 4.9.5.0 > > Hello. I'm trying to get the GTK+ 2.0.3 package to work correctly with my > Dev-Cpp install on Win2k. I'm using the default minGW complier that comes > with Dev-Cpp, and I've installed all the Dev-Cpp updates that the update > tool says are available. > > I believe that I have the include directories properly registered with the > IDE. What I'm getting are linking errors. > > [Linker error] undefined reference to `gtk_init_abi_check' > [Linker error] undefined reference to `gtk_window_new' > [Linker error] undefined reference to `gtk_widget_show' > [Linker error] undefined reference to `gtk_main' > > Here is the simple program I'm trying to get to compile and run correctly as > a test of my GTK setup: > > #include <gtk/gtk.h> > > int main (int argc, char *argv[]) > { > > GtkWidget *window; > > gtk_init (&argc, &argv); > > window = gtk_window_new (GTK_WINDOW_TOPLEVEL); > > gtk_widget_show (window); > > gtk_main(); > > return 0; > > } > > As I said, a simple test program. > > I'm sure that there's something I haven't configured correctly that is > causing the problem. Could it be that I need to insert '-lglib' and > '-lgtk+' in my compiler options somewhere? > > Thanks for any assistance. > > Mark Brooks > > > > --__--__-- > > Message: 9 > Date: Sat, 10 Aug 2002 15:28:52 +0200 > From: Zodiaq <zo...@ac...> > Reply-To: Zodiaq <zo...@ac...> > Organization: Earth > To: Dev...@li... > Subject: Re[4]: [Dev-C++] monitoring traffic, how? > > Hello A and all Dev-C++ users, > > Saturday, August 10, 2002, 1:45:19 PM, A wrote as follows: > > AK> You don´t need a driver for getting this info. There are numerous small > AK> applications which give you that info, some with source, like: > AK> http://gamma.nic.fi/~rainy/Rainmeter.html which is extensible by your own > AK> plugins and is GPLed. > > Yeah, nice software, but I don't have time to analize how it works... > instead someone on newsgroup gave me info how to do what I want... the > answer is very simple - IP helper API... just simple like that... I'm > already building my simple app that monitor data flow through my > interfaces... and now I need SOME MORE HELP... > > Does anybody know (or have some example) how to properly build header > control that could work on strings (edit controls?) ? Well, I found > how to build header, but how to make it work (make it move data below > it) with some edit controls... I have problems understanding how it > works - header and rich edit ? Well, when I put header control inside > rich edit I can normally put text inside rich edit - and that text > destroys header(writes over)... which is BAD! ;-] Any help > apreciated... > > AK> Alex > > -- > regards, Zodiaq > > > > --__--__-- > > Message: 10 > Date: Sat, 10 Aug 2002 16:05:55 +0200 > From: Zodiaq <zo...@ac...> > Reply-To: Zodiaq <zo...@ac...> > Organization: Earth > To: Dev...@li... > Subject: [Dev-C++] forget... > > Hello, forget about my last question... > > what I need is not header control but list view control... > > --- > regards, Zodiaq > > > > --__--__-- > > Message: 11 > From: "Mark Brooks" <jmb...@ea...> > To: <dev...@li...> > Subject: RE: [Dev-C++] Problem linking simple GTK+ prog with Dev-Cpp 4.9.5.0 > Date: Sat, 10 Aug 2002 10:20:48 -0400 > > One other note. I installed GTK+ with the package manager. > > Mark Brooks > > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...]On Behalf Of Mark > > Brooks > > Sent: Saturday, August 10, 2002 8:56 AM > > To: dev...@li... > > Subject: [Dev-C++] Problem linking simple GTK+ prog with Dev-Cpp 4.9.5.0 > > > > > > Hello. I'm trying to get the GTK+ 2.0.3 package to work correctly with my > > Dev-Cpp install on Win2k. I'm using the default minGW complier that comes > > with Dev-Cpp, and I've installed all the Dev-Cpp updates that the update > > tool says are available. > > > > I believe that I have the include directories properly registered with the > > IDE. What I'm getting are linking errors. > > > > [Linker error] undefined reference to `gtk_init_abi_check' > > [Linker error] undefined reference to `gtk_window_new' > > [Linker error] undefined reference to `gtk_widget_show' > > [Linker error] undefined reference to `gtk_main' > > > > Here is the simple program I'm trying to get to compile and run > > correctly as > > a test of my GTK setup: > > > > #include <gtk/gtk.h> > > > > int main (int argc, char *argv[]) > > { > > > > GtkWidget *window; > > > > gtk_init (&argc, &argv); > > > > window = gtk_window_new (GTK_WINDOW_TOPLEVEL); > > > > gtk_widget_show (window); > > > > gtk_main(); > > > > return 0; > > > > } > > > > As I said, a simple test program. > > > > I'm sure that there's something I haven't configured correctly that is > > causing the problem. Could it be that I need to insert '-lglib' and > > '-lgtk+' in my compiler options somewhere? > > > > Thanks for any assistance. > > > > Mark Brooks > > > > > > > > ------------------------------------------------------- > > 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 > > > > --__--__-- > > Message: 12 > Subject: Re: [Dev-C++] Problem linking simple GTK+ prog with Dev-Cpp 4.9.5.0 > From: Hongli Lai <h....@ch...> > To: Mark Brooks <jmb...@ea...> > Cc: dev...@li... > Date: 10 Aug 2002 17:52:37 +0200 > > On Sat, 2002-08-10 at 14:55, Mark Brooks wrote: > > Hello. I'm trying to get the GTK+ 2.0.3 package to work correctly with my > > Dev-Cpp install on Win2k. I'm using the default minGW complier that comes > > with Dev-Cpp, and I've installed all the Dev-Cpp updates that the update > > tool says are available. > > Use the GTK+ *template*. > > > > > --__--__-- > > Message: 13 > From: "Garrett Bratvold" <Jed...@ms...> > To: <dev...@li...> > Date: Sat, 10 Aug 2002 12:01:47 -0500 > Subject: [Dev-C++] graphics.h (Where Do i Get It) > > > ------=_NextPart_001_0000_01C24065.B3E37CA0 > Content-Type: text/plain; charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > I Was Wondering, Where Can I Get a Dev C++ Compatible graphics.h? And It= > s Really Hard To Find, Please--If You Know, Please Email Me: =20 > > Jed...@ms... . > > May The Force Be With You, > Garrett B.Get more from the Web. FREE MSN Explorer download : http://exp= > lorer.msn.com > > ------=_NextPart_001_0000_01C24065.B3E37CA0 > Content-Type: text/html; charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > <HTML><BODY STYLE=3D"font:10pt verdana; border:none;"><DIV>I Was Wonderin= > g, Where Can I Get a Dev C++ Compatible graphics.h? And Its Re= > ally Hard To Find, Please--If You Know, Please Email Me: </DIV> <DIV>&nbs= > p;</DIV> <DIV><A href=3D"mailto:Jed...@ms...">Jed...@ms...= > m</A> .<BR><BR>May The Force Be With You,<BR>Garrett B.</DIV></BODY></HTM= > L><br clear=3Dall><hr>Get more from the Web. FREE MSN Explorer download = > : <a href=3D'http://explorer.msn.com'>http://explorer.msn.com</a><br></p> > > ------=_NextPart_001_0000_01C24065.B3E37CA0-- > > > --__--__-- > > Message: 14 > Subject: Re: [Dev-C++] graphics.h (Where Do i Get It) > From: Hongli Lai <h....@ch...> > To: Garrett Bratvold <Jed...@ms...> > Cc: dev...@li... > Date: 10 Aug 2002 19:23:26 +0200 > > On Sat, 2002-08-10 at 19:01, Garrett Bratvold wrote: > > I Was Wondering, Where Can I Get a Dev C++ Compatible graphics.h? And Its Really Hard To Find, Please--If You Know, Please Email Me: > > > > One Answer: You Can't. It's A Borland/DOS Extension. If You Want To > Access Graphics Routines, Use The Win32 API Directly Or Use Some > Graphics Library Like SDL Or DirectX. > (and could you *please* stop typing everything in BiCapital?) > > > > > > --__--__-- > > _______________________________________________ > 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 > |