dev-cpp-users Mailing List for Dev-C++ (Page 311)
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: Daniel G. <sp...@ho...> - 2003-10-01 17:07:51
|
lol funny Let's wait and see if this makes any difference to software companies... >From: OROSZI Balázs <or...@vp...> >To: dev...@li... >Subject: Re: [Dev-C++] Software Patents in Europe >Date: Wed, 01 Oct 2003 18:49:31 +0200 > >age...@co... wrote: >>That is the stupidest law I have ever heard of. At least we don't have >>that in the US(yet). If so, Microsoft would kill the US. > >Really? I thought they actually wanted to move this law into Europe FROM >the US. And MS won't kill the US. Noooooo. They'll just continuously suck >out as much of it's blood as they can... > >-- >Greetings, > Balázs > > > >------------------------------------------------------- >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://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger |
|
From: <or...@vp...> - 2003-10-01 16:48:08
|
age...@co... wrote: > That is the stupidest law I have ever heard of. At least we don't have that in > the US(yet). If so, Microsoft would kill the US. Really? I thought they actually wanted to move this law into Europe FROM the US. And MS won't kill the US. Noooooo. They'll just continuously suck out as much of it's blood as they can... -- Greetings, Balázs |
|
From: Chris S. <CS...@Ai...> - 2003-10-01 07:54:05
|
I'm glad someone has nipped this one in the bud !!=20 I'm glad to see that this forum is for people to find solutions to = genuine problems they have in using DevC++ or C/C++, and that it's not = being used as a place for people to find ways to get others to do work = for them.=20 :-) -----Original Message----- From: P.D. van Zelst [mailto:pa...@my...] Sent: Wednesday, 1 October 2003 4:14 PM To: 'Chin He Quan'; dev...@li... Subject: RE: [Dev-C++] Re:help Sure, we all love doing other people's homework. Think about this (very simple!) problem just for a second or two and you = can figure it out for yourself. It probably takes you more time to write = this mail and wait for someone who actually sends you such a program than it = does for you to write it yourself. ________________________________ From: dev...@li... [mailto:dev...@li...] On Behalf Of Chin He = Quan Sent: Wednesday, October 01, 2003 4:34 AM To: dev...@li... Subject: [Dev-C++] Re:help =20 I have a problem using Dev-C++ making the following programme: a 4rows = by 5 columns of seats, it must display=20 A1 A2 A3 B1 B2 B3 and so on, when the seats are booked, it will display=20 =20 A1 X A3 X B2 B3 if possible send me the programme for making this. Thank You! ------------------------------------------------------- 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://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: P.D. v. Z. <pa...@my...> - 2003-10-01 06:12:50
|
Sure, we all love doing other people's homework. Think about this (very simple!) problem just for a second or two and you can figure it out for yourself. It probably takes you more time to write this mail and wait for someone who actually sends you such a program than it does for you to write it yourself. ________________________________ From: dev...@li... [mailto:dev...@li...] On Behalf Of Chin He Quan Sent: Wednesday, October 01, 2003 4:34 AM To: dev...@li... Subject: [Dev-C++] Re:help I have a problem using Dev-C++ making the following programme: a 4rows by 5 columns of seats, it must display A1 A2 A3 B1 B2 B3 and so on, when the seats are booked, it will display A1 X A3 X B2 B3 if possible send me the programme for making this. Thank You! |
|
From: Chin He Q. <he...@si...> - 2003-10-01 02:09:06
|
=20 I have a problem using Dev-C++ making the following programme: a 4rows = by 5 columns of seats, it must display=20 A1 A2 A3 B1 B2 B3 and so on, when the seats are booked, it will display=20 =20 A1 X A3 X B2 B3 if possible send me the programme for making this. Thank = You! |
|
From: Michael D. S. <for...@hi...> - 2003-10-01 00:27:51
|
I thought this was relevant to everyone who writes a line of code. Forget=20 about marketing. Marketing isn't required, just distributing, for instance,= =20 sending a line of code to a list to ask a question. Possibly? YOU! could=20 easily be breaking the law if this passes. In fact, I believe it will be=20 almost impossible for you not to break the law. And you certainly won't be= =20 able to do anything useful with a computer and not break the law. Unless of= =20 course you pay and pay and pay and pay and then pay some more. And guess=20 who is shoving truck loads (literally) of money at the so called=20 "representatives of the people" who are deciding this issue. Certainly not= =20 those who don't want to pay. I really hope it results in so many of the slimeballs of the world suing=20 each other for so long for so much money that they all end up broke and=20 paralyzed from their efforts, but I'm a dreamer :) The announcement of the finishing of the shareware program was spam. But I have a delete button and if it gets out of hand, I can unsubscribe. ms At 03:04 PM 9/30/03, you wrote: >mar1a wrote: > >>In the next few days, the European Parliament will decide about the >>legalisation and adoption of so-called "software patents" in Europe, which >>are already used by large companies in other countries to put competitors >>out of business. This can lead to the termination of many software= projects >>at least within Europe, because the holders of the over 30,000 already >>granted "software patents" (currently without a legal foundation) can= claim >>exclusive rights and collect license fees for trivial things like= "progress >>bars", "mouseclicks on online order forms", "scrolling within a window"= and >>similar. That way, software developers will have to pay the >>"software-patentholders" for using these features, even in their own, >>completely self-developed applications, which can completely stall the >>development of innovative software for small and medium companies. Apart >>from this, the expense for patent inquiries and legal assistence is high, >>for even trying to find out if the self-developed software is possibly >>violating "software-patents", if you want to continue to market your >>software. Contrary to real patents, "software-patents" are, in the current >>draft, monopolization of business ideas and methods, even without any >>tangible technical implementation. >>Support NOW!!! : http://aktiv.ffii.org/eubsa/en > >Though this might seem spamish for newbies, this IS (was :D ) really=20 >serious. I truly recommend everyone to visit >http://www.ffii.org >for the latest news. You won't be disappointed :) > >-- >Greetings, > Bal=E1zs > > > > >------------------------------------------------------- >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://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Chin He Q. <he...@si...> - 2003-10-01 00:08:55
|
confirm 268897 |
|
From: <or...@vp...> - 2003-09-30 20:03:02
|
mar1a wrote: > In the next few days, the European Parliament will decide about the > legalisation and adoption of so-called "software patents" in Europe, which > are already used by large companies in other countries to put competitors > out of business. This can lead to the termination of many software projects > at least within Europe, because the holders of the over 30,000 already > granted "software patents" (currently without a legal foundation) can claim > exclusive rights and collect license fees for trivial things like "progress > bars", "mouseclicks on online order forms", "scrolling within a window" and > similar. That way, software developers will have to pay the > "software-patentholders" for using these features, even in their own, > completely self-developed applications, which can completely stall the > development of innovative software for small and medium companies. Apart > from this, the expense for patent inquiries and legal assistence is high, > for even trying to find out if the self-developed software is possibly > violating "software-patents", if you want to continue to market your > software. Contrary to real patents, "software-patents" are, in the current > draft, monopolization of business ideas and methods, even without any > tangible technical implementation. > > Support NOW!!! : http://aktiv.ffii.org/eubsa/en Though this might seem spamish for newbies, this IS (was :D ) really serious. I truly recommend everyone to visit http://www.ffii.org for the latest news. You won't be disappointed :) -- Greetings, Balázs |
|
From: <sol...@ya...> - 2003-09-30 18:56:36
|
The program consumes an enormous amount of CPU, so other programs run so slow. |
|
From: <sol...@ya...> - 2003-09-30 18:28:15
|
The first is that if you have compiled one project, modify one of its sources and then press compile (F9) it compiles the modified file, but when you press execute it says project not compiled, that if it doesn't show linker errors with the string class. The second is that webupdate says it's disconnected or the server is down and so it cannot check for updates. |
|
From: Vale G. <val...@at...> - 2003-09-30 17:47:52
|
Edric - > On a successful match in criteria, I wish to delete the iterator and its contents away from the memory. The nice thing about STLs is that they take care of all of the fiddly bits for you. I'm not sure that an STL container implementation is required to free up the memory used by a deleted member. Don't worry about it. > However, when I attempted to call delete on the node that I want to remove, the compilation throws an error. > delete(*xIter); // Compilation fails at this point I don't think that you can dereference an iterator. Eliminate the line that won't compile. It's not needed. The member is erased by the line: resultTable.erase(xIter++); but Danger! Danger! If the container is a vector, string or deque, the iterator is invalid after the erase. It's too much to go into here. For more information, see Item 9 in Scott Meyer's Effective STL book. Nicolai Josuttis' The C++ Standard Library would also be a very good investment. Chuck |
|
From: Opacki, J. <Jos...@ng...> - 2003-09-30 17:04:37
|
Reid, I got it working finally. Thanks for all the help. This is all still new to me. I am still having a small bit trouble understanding friends and overloading operators, especially the use of const. Got any sites for me? Thanks Joseph -----Original Message----- From: Reid Thompson [mailto:Rei...@at...] Sent: Tuesday, September 30, 2003 12:19 PM To: Opacki, Joseph; dev...@li... Subject: RE: [Dev-C++] Newbie: Linker Errors for some reason it is not linking in compile.o My compile log: Compiler: Default compiler Building Makefile: "C:\Downloads\jnk\Makefile.win" Executing make clean rm -f main.o compile.o jnk1.exe g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" g++.exe -c compile.cpp -o compile.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" g++.exe main.o compile.o -o "jnk1.exe" -L"C:/Dev-Cpp/lib" Execution terminated Compilation successful do this, create a new project using the menu remove the default main.c program created using the menu add files ( your three files ) then build & run reid > -----Original Message----- > From: Opacki, Joseph [mailto:Jos...@ng...] > Sent: Tuesday, September 30, 2003 12:08 PM > To: 'dev...@li...' > Subject: RE: [Dev-C++] Newbie: Linker Errors > > > Reid > > I'm not getting the same errors... My errors do not say a > line number and only appear as such: > > [Linker error] undefined reference to > `DigitalTime::DigitalTime()' [Linker error] undefined > reference to `operator>>(std::istream&, DigitalTime&)' > [Linker error] undefined reference to `DigitalTime::advance(int)' > [Linker error] undefined reference to `operator==(DigitalTime > const&, DigitalTime const&)' > [Linker error] undefined reference to > `operator<<(std::ostream&, DigitalTime const&)' [Linker > error] undefined reference to `DigitalTime::advance(int, int)' > > Here's my compiler log: > > ------------------------------------------------------- > Compiler: Default compiler > Executing g++.exe... > g++.exe "C:\compile\main.cpp" -o "C:\compile\main.exe" > -I"C:\Dev-Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32" > -I"C:\Dev-Cpp\include\c++\backward" -I"C:\Dev-Cpp\include" > -L"C:\Dev-Cpp\lib" > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x134):main.cpp: > undefined reference to `DigitalTime::DigitalTime()' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x143):main.cpp: > undefined reference to `DigitalTime::DigitalTime()' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x16c):main.cpp: > undefined reference to `operator>>(std::istream&, DigitalTime&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x189):main.cpp: > undefined reference to `DigitalTime::advance(int)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x19c):main.cpp: > undefined reference to `operator==(DigitalTime const&, > DigitalTime const&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x1e2):main.cpp: > undefined reference to `operator<<(std::ostream&, DigitalTime const&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x218):main.cpp: > undefined reference to `operator<<(std::ostream&, DigitalTime const&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x234):main.cpp: > undefined reference to `DigitalTime::advance(int, int)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x261):main.cpp: > undefined reference to `operator<<(std::ostream&, DigitalTime > const&)' Execution terminated > > ------------------------------------------------------- > > -----Original Message----- > From: Reid Thompson [mailto:Rei...@at...] > Sent: Tuesday, September 30, 2003 11:25 AM > To: Opacki, Joseph; dev...@li... > Subject: RE: [Dev-C++] Newbie: Linker Errors > > > if these are the messages you are getting: > compile.cpp: In member function `void DigitalTime::advance(int, int)': > compile.cpp:56: `hourAdded' undeclared (first use this function) > compile.cpp:56: (Each undeclared identifier is reported only > once for each > function it appears in.) > compile.cpp: In function `std::ostream& > operator<<(std::ostream&, const > DigitalTime&)': > compile.cpp:63: `theOjbect' undeclared (first use this function) > compile.cpp: In function `std::istream& operator>>(std::istream&, > DigitalTime&)': > compile.cpp:73: `readHours' undeclared (first use this function) > compile.cpp: In function `void readHour(std::istream&, int&)': > compile.cpp:127: `thehour' undeclared (first use this function) > make.exe: *** [compile.o] Error 1 Execution terminated > > Then you need to declare each of these missing values( or > spell them as they have been declared ). > hour = (hour + hourAdded)%24; should hourAdded be > hoursAdded per void DigitalTime::advance(int hoursAdded, int > minutesAdded) > > if (theOjbect.minute < 10) -> as above spelling counts > > readHours(ins, theObject.hour); -> ditto > > readHours(ins, theObject.hour); -> ditto > reid > > > > > > -----Original Message----- > > From: Opacki, Joseph [mailto:Jos...@ng...] > > Sent: Tuesday, September 30, 2003 10:17 AM > > To: 'dev...@li...' > > Subject: [Dev-C++] Newbie: Linker Errors > > > > > > I'm still learning so please be patient. > > > > I am running into some problems. I've defined my interface > > file as "compile.h", my implementation file as "compile.cpp", > > and my application file as "main.cpp". The implementation > > and application files both contain [ #include "compile.h" ]. > > However, when I try to compile my application file, I receive > > numerous linker errors with undefined references to my class. > > > > HELP! > > > > Am I not understanding the whole seperate file compilation? > > Isn't the class interface and implementation files supposed > > to be named the same and just with different extensions? > > > > I've attached all three files...thanks. > > > > Joe <<compile.cpp>> <<compile.h>> <<main.cpp>> > > > > > ------------------------------------------------------- > 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://www23.brinkster.com/noicys/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://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Opacki, J. <Jos...@ng...> - 2003-09-30 16:49:54
|
Reid, That did it. It's compiling and running, but for some reason the minutes don't seem to be advancing. It appears that clock.advance(15); is not pushing my minutes up...I'm going to have to debug. Thanks for the great assistance, but I'm afraid I really don't quite understand everything that was going wrong??? Joseph -----Original Message----- From: Reid Thompson [mailto:Rei...@at...] Sent: Tuesday, September 30, 2003 12:19 PM To: Opacki, Joseph; dev...@li... Subject: RE: [Dev-C++] Newbie: Linker Errors for some reason it is not linking in compile.o My compile log: Compiler: Default compiler Building Makefile: "C:\Downloads\jnk\Makefile.win" Executing make clean rm -f main.o compile.o jnk1.exe g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" g++.exe -c compile.cpp -o compile.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" g++.exe main.o compile.o -o "jnk1.exe" -L"C:/Dev-Cpp/lib" Execution terminated Compilation successful do this, create a new project using the menu remove the default main.c program created using the menu add files ( your three files ) then build & run reid > -----Original Message----- > From: Opacki, Joseph [mailto:Jos...@ng...] > Sent: Tuesday, September 30, 2003 12:08 PM > To: 'dev...@li...' > Subject: RE: [Dev-C++] Newbie: Linker Errors > > > Reid > > I'm not getting the same errors... My errors do not say a > line number and only appear as such: > > [Linker error] undefined reference to > `DigitalTime::DigitalTime()' [Linker error] undefined > reference to `operator>>(std::istream&, DigitalTime&)' > [Linker error] undefined reference to `DigitalTime::advance(int)' > [Linker error] undefined reference to `operator==(DigitalTime > const&, DigitalTime const&)' > [Linker error] undefined reference to > `operator<<(std::ostream&, DigitalTime const&)' [Linker > error] undefined reference to `DigitalTime::advance(int, int)' > > Here's my compiler log: > > ------------------------------------------------------- > Compiler: Default compiler > Executing g++.exe... > g++.exe "C:\compile\main.cpp" -o "C:\compile\main.exe" > -I"C:\Dev-Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32" > -I"C:\Dev-Cpp\include\c++\backward" -I"C:\Dev-Cpp\include" > -L"C:\Dev-Cpp\lib" > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x134):main.cpp: > undefined reference to `DigitalTime::DigitalTime()' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x143):main.cpp: > undefined reference to `DigitalTime::DigitalTime()' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x16c):main.cpp: > undefined reference to `operator>>(std::istream&, DigitalTime&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x189):main.cpp: > undefined reference to `DigitalTime::advance(int)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x19c):main.cpp: > undefined reference to `operator==(DigitalTime const&, > DigitalTime const&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x1e2):main.cpp: > undefined reference to `operator<<(std::ostream&, DigitalTime const&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x218):main.cpp: > undefined reference to `operator<<(std::ostream&, DigitalTime const&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x234):main.cpp: > undefined reference to `DigitalTime::advance(int, int)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x261):main.cpp: > undefined reference to `operator<<(std::ostream&, DigitalTime > const&)' Execution terminated > > ------------------------------------------------------- > > -----Original Message----- > From: Reid Thompson [mailto:Rei...@at...] > Sent: Tuesday, September 30, 2003 11:25 AM > To: Opacki, Joseph; dev...@li... > Subject: RE: [Dev-C++] Newbie: Linker Errors > > > if these are the messages you are getting: > compile.cpp: In member function `void DigitalTime::advance(int, int)': > compile.cpp:56: `hourAdded' undeclared (first use this function) > compile.cpp:56: (Each undeclared identifier is reported only > once for each > function it appears in.) > compile.cpp: In function `std::ostream& > operator<<(std::ostream&, const > DigitalTime&)': > compile.cpp:63: `theOjbect' undeclared (first use this function) > compile.cpp: In function `std::istream& operator>>(std::istream&, > DigitalTime&)': > compile.cpp:73: `readHours' undeclared (first use this function) > compile.cpp: In function `void readHour(std::istream&, int&)': > compile.cpp:127: `thehour' undeclared (first use this function) > make.exe: *** [compile.o] Error 1 Execution terminated > > Then you need to declare each of these missing values( or > spell them as they have been declared ). > hour = (hour + hourAdded)%24; should hourAdded be > hoursAdded per void DigitalTime::advance(int hoursAdded, int > minutesAdded) > > if (theOjbect.minute < 10) -> as above spelling counts > > readHours(ins, theObject.hour); -> ditto > > readHours(ins, theObject.hour); -> ditto > reid > > > > > > -----Original Message----- > > From: Opacki, Joseph [mailto:Jos...@ng...] > > Sent: Tuesday, September 30, 2003 10:17 AM > > To: 'dev...@li...' > > Subject: [Dev-C++] Newbie: Linker Errors > > > > > > I'm still learning so please be patient. > > > > I am running into some problems. I've defined my interface > > file as "compile.h", my implementation file as "compile.cpp", > > and my application file as "main.cpp". The implementation > > and application files both contain [ #include "compile.h" ]. > > However, when I try to compile my application file, I receive > > numerous linker errors with undefined references to my class. > > > > HELP! > > > > Am I not understanding the whole seperate file compilation? > > Isn't the class interface and implementation files supposed > > to be named the same and just with different extensions? > > > > I've attached all three files...thanks. > > > > Joe <<compile.cpp>> <<compile.h>> <<main.cpp>> > > > > > ------------------------------------------------------- > 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://www23.brinkster.com/noicys/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://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Stefan K. <ste...@ya...> - 2003-09-30 16:32:43
|
Hm... That's not so simple. For dynamically allocated memory using the "new" operator or "malloc", this can be done by: Overriding the global operator new and adding the amount of bytes to a global variable. You also can override global operator delete to subtract the freed amount of bytes from that variable - that way you can check if all allocated memory has properly been freed before terminating your program. If you use malloc(), write and use your own function, for example AppMalloc() and AppFree() and add/subtract the amount of bytes to a global variable. There is no other way to do it in C/C++, as far as I know, and no Windows API function that can tell you how much RAM you're using. Hope this helps! Stefan Daniel Glenfield wrote: > How can I find out how much memory my program is using? > I'm running it under windows and was wondering if there's a Windows API > call or some utility on the net that can latch on to my program and find > out how much memory it is actually using. > > If I'm not being specific enough, tell me. > > Daniel -- Stefan Kuhn Software Development ste...@ya... |
|
From: Reid T. <Rei...@at...> - 2003-09-30 16:19:32
|
for some reason it is not linking in compile.o My compile log: Compiler: Default compiler Building Makefile: "C:\Downloads\jnk\Makefile.win" Executing make clean rm -f main.o compile.o jnk1.exe g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" g++.exe -c compile.cpp -o compile.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" g++.exe main.o compile.o -o "jnk1.exe" -L"C:/Dev-Cpp/lib" Execution terminated Compilation successful do this, create a new project using the menu remove the default main.c program created=20 using the menu add files ( your three files ) then build & run reid > -----Original Message----- > From: Opacki, Joseph [mailto:Jos...@ng...]=20 > Sent: Tuesday, September 30, 2003 12:08 PM > To: 'dev...@li...' > Subject: RE: [Dev-C++] Newbie: Linker Errors >=20 >=20 > Reid >=20 > I'm not getting the same errors... My errors do not say a=20 > line number and only appear as such: >=20 > [Linker error] undefined reference to=20 > `DigitalTime::DigitalTime()' [Linker error] undefined=20 > reference to `operator>>(std::istream&, DigitalTime&)'=20 > [Linker error] undefined reference to `DigitalTime::advance(int)'=20 > [Linker error] undefined reference to `operator=3D=3D(DigitalTime=20 > const&, DigitalTime const&)'=20 > [Linker error] undefined reference to=20 > `operator<<(std::ostream&, DigitalTime const&)' [Linker=20 > error] undefined reference to `DigitalTime::advance(int, int)'=20 >=20 > Here's my compiler log: >=20 > ------------------------------------------------------- > Compiler: Default compiler > Executing g++.exe... > g++.exe "C:\compile\main.cpp" -o "C:\compile\main.exe" > -I"C:\Dev-Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32" > -I"C:\Dev-Cpp\include\c++\backward" -I"C:\Dev-Cpp\include"=20 > -L"C:\Dev-Cpp\lib" > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x134):main.cpp: > undefined reference to `DigitalTime::DigitalTime()' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x143):main.cpp: > undefined reference to `DigitalTime::DigitalTime()' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x16c):main.cpp: > undefined reference to `operator>>(std::istream&, DigitalTime&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x189):main.cpp: > undefined reference to `DigitalTime::advance(int)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x19c):main.cpp: > undefined reference to `operator=3D=3D(DigitalTime const&,=20 > DigitalTime const&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x1e2):main.cpp: > undefined reference to `operator<<(std::ostream&, DigitalTime const&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x218):main.cpp: > undefined reference to `operator<<(std::ostream&, DigitalTime const&)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x234):main.cpp: > undefined reference to `DigitalTime::advance(int, int)' > C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x261):main.cpp: > undefined reference to `operator<<(std::ostream&, DigitalTime=20 > const&)' Execution terminated >=20 > ------------------------------------------------------- >=20 > -----Original Message----- > From: Reid Thompson [mailto:Rei...@at...] > Sent: Tuesday, September 30, 2003 11:25 AM > To: Opacki, Joseph; dev...@li... > Subject: RE: [Dev-C++] Newbie: Linker Errors >=20 >=20 > if these are the messages you are getting: > compile.cpp: In member function `void DigitalTime::advance(int, int)': > compile.cpp:56: `hourAdded' undeclared (first use this function) > compile.cpp:56: (Each undeclared identifier is reported only=20 > once for each=20 > function it appears in.) > compile.cpp: In function `std::ostream&=20 > operator<<(std::ostream&, const=20 > DigitalTime&)': > compile.cpp:63: `theOjbect' undeclared (first use this function) > compile.cpp: In function `std::istream& operator>>(std::istream&,=20 > DigitalTime&)': > compile.cpp:73: `readHours' undeclared (first use this function) > compile.cpp: In function `void readHour(std::istream&, int&)': > compile.cpp:127: `thehour' undeclared (first use this function) > make.exe: *** [compile.o] Error 1 Execution terminated >=20 > Then you need to declare each of these missing values( or=20 > spell them as they have been declared ). > hour =3D (hour + hourAdded)%24; should hourAdded be=20 > hoursAdded per void DigitalTime::advance(int hoursAdded, int=20 > minutesAdded) >=20 > if (theOjbect.minute < 10) -> as above spelling counts >=20 > readHours(ins, theObject.hour); -> ditto >=20 > readHours(ins, theObject.hour); -> ditto > reid >=20 >=20 >=20 >=20 > > -----Original Message----- > > From: Opacki, Joseph [mailto:Jos...@ng...] > > Sent: Tuesday, September 30, 2003 10:17 AM > > To: 'dev...@li...' > > Subject: [Dev-C++] Newbie: Linker Errors > >=20 > >=20 > > I'm still learning so please be patient. > >=20 > > I am running into some problems. I've defined my interface > > file as "compile.h", my implementation file as "compile.cpp",=20 > > and my application file as "main.cpp". The implementation=20 > > and application files both contain [ #include "compile.h" ]. =20 > > However, when I try to compile my application file, I receive=20 > > numerous linker errors with undefined references to my class. > >=20 > > HELP! > >=20 > > Am I not understanding the whole seperate file compilation? > > Isn't the class interface and implementation files supposed=20 > > to be named the same and just with different extensions? =20 > >=20 > > I've attached all three files...thanks. > >=20 > > Joe <<compile.cpp>> <<compile.h>> <<main.cpp>> > >=20 >=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://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >=20 |
|
From: <sol...@ya...> - 2003-09-30 16:17:53
|
It was there in Dev4.0, but now it has dissappeared. Brian N. wrote: >Where is the resource editor? The help file says it's supposed to be under the >Project menu but I can't find it anywhere. I have v 4.9.8.3, so maybe it's not >available yet on this version..? > > |
|
From: Opacki, J. <Jos...@ng...> - 2003-09-30 16:08:21
|
Reid
I'm not getting the same errors... My errors do not say a line number and
only appear as such:
[Linker error] undefined reference to `DigitalTime::DigitalTime()'
[Linker error] undefined reference to `operator>>(std::istream&,
DigitalTime&)'
[Linker error] undefined reference to `DigitalTime::advance(int)'
[Linker error] undefined reference to `operator==(DigitalTime const&,
DigitalTime const&)'
[Linker error] undefined reference to `operator<<(std::ostream&, DigitalTime
const&)'
[Linker error] undefined reference to `DigitalTime::advance(int, int)'
Here's my compiler log:
-------------------------------------------------------
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\compile\main.cpp" -o "C:\compile\main.exe"
-I"C:\Dev-Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32"
-I"C:\Dev-Cpp\include\c++\backward" -I"C:\Dev-Cpp\include"
-L"C:\Dev-Cpp\lib"
C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x134):main.cpp:
undefined reference to `DigitalTime::DigitalTime()'
C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x143):main.cpp:
undefined reference to `DigitalTime::DigitalTime()'
C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x16c):main.cpp:
undefined reference to `operator>>(std::istream&, DigitalTime&)'
C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x189):main.cpp:
undefined reference to `DigitalTime::advance(int)'
C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x19c):main.cpp:
undefined reference to `operator==(DigitalTime const&, DigitalTime const&)'
C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x1e2):main.cpp:
undefined reference to `operator<<(std::ostream&, DigitalTime const&)'
C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x218):main.cpp:
undefined reference to `operator<<(std::ostream&, DigitalTime const&)'
C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x234):main.cpp:
undefined reference to `DigitalTime::advance(int, int)'
C:\DOCUME~1\opackjo\LOCALS~1\Temp/ccEVaaaa.o(.text+0x261):main.cpp:
undefined reference to `operator<<(std::ostream&, DigitalTime const&)'
Execution terminated
-------------------------------------------------------
-----Original Message-----
From: Reid Thompson [mailto:Rei...@at...]
Sent: Tuesday, September 30, 2003 11:25 AM
To: Opacki, Joseph; dev...@li...
Subject: RE: [Dev-C++] Newbie: Linker Errors
if these are the messages you are getting:
compile.cpp: In member function `void DigitalTime::advance(int, int)':
compile.cpp:56: `hourAdded' undeclared (first use this function)
compile.cpp:56: (Each undeclared identifier is reported only once for
each
function it appears in.)
compile.cpp: In function `std::ostream& operator<<(std::ostream&, const
DigitalTime&)':
compile.cpp:63: `theOjbect' undeclared (first use this function)
compile.cpp: In function `std::istream& operator>>(std::istream&,
DigitalTime&)':
compile.cpp:73: `readHours' undeclared (first use this function)
compile.cpp: In function `void readHour(std::istream&, int&)':
compile.cpp:127: `thehour' undeclared (first use this function)
make.exe: *** [compile.o] Error 1 Execution terminated
Then you need to declare each of these missing values( or spell them as
they have been declared ).
hour = (hour + hourAdded)%24; should hourAdded be hoursAdded per
void DigitalTime::advance(int hoursAdded, int minutesAdded)
if (theOjbect.minute < 10) -> as above spelling counts
readHours(ins, theObject.hour); -> ditto
readHours(ins, theObject.hour); -> ditto
reid
> -----Original Message-----
> From: Opacki, Joseph [mailto:Jos...@ng...]
> Sent: Tuesday, September 30, 2003 10:17 AM
> To: 'dev...@li...'
> Subject: [Dev-C++] Newbie: Linker Errors
>
>
> I'm still learning so please be patient.
>
> I am running into some problems. I've defined my interface
> file as "compile.h", my implementation file as "compile.cpp",
> and my application file as "main.cpp". The implementation
> and application files both contain [ #include "compile.h" ].
> However, when I try to compile my application file, I receive
> numerous linker errors with undefined references to my class.
>
> HELP!
>
> Am I not understanding the whole seperate file compilation?
> Isn't the class interface and implementation files supposed
> to be named the same and just with different extensions?
>
> I've attached all three files...thanks.
>
> Joe <<compile.cpp>> <<compile.h>> <<main.cpp>>
>
|
|
From: Reid T. <Rei...@at...> - 2003-09-30 15:24:37
|
if these are the messages you are getting:
compile.cpp: In member function `void DigitalTime::advance(int, int)':
compile.cpp:56: `hourAdded' undeclared (first use this function)
compile.cpp:56: (Each undeclared identifier is reported only once for
each=20
function it appears in.)
compile.cpp: In function `std::ostream& operator<<(std::ostream&, const=20
DigitalTime&)':
compile.cpp:63: `theOjbect' undeclared (first use this function)
compile.cpp: In function `std::istream& operator>>(std::istream&,=20
DigitalTime&)':
compile.cpp:73: `readHours' undeclared (first use this function)
compile.cpp: In function `void readHour(std::istream&, int&)':
compile.cpp:127: `thehour' undeclared (first use this function)
make.exe: *** [compile.o] Error 1 Execution terminated
Then you need to declare each of these missing values( or spell them as
they have been declared ).
hour =3D (hour + hourAdded)%24; should hourAdded be hoursAdded per
void DigitalTime::advance(int hoursAdded, int minutesAdded)
if (theOjbect.minute < 10) -> as above spelling counts
readHours(ins, theObject.hour); -> ditto
readHours(ins, theObject.hour); -> ditto
reid
> -----Original Message-----
> From: Opacki, Joseph [mailto:Jos...@ng...]=20
> Sent: Tuesday, September 30, 2003 10:17 AM
> To: 'dev...@li...'
> Subject: [Dev-C++] Newbie: Linker Errors
>=20
>=20
> I'm still learning so please be patient.
>=20
> I am running into some problems. I've defined my interface=20
> file as "compile.h", my implementation file as "compile.cpp",=20
> and my application file as "main.cpp". The implementation=20
> and application files both contain [ #include "compile.h" ]. =20
> However, when I try to compile my application file, I receive=20
> numerous linker errors with undefined references to my class.
>=20
> HELP! =20
>=20
> Am I not understanding the whole seperate file compilation? =20
> Isn't the class interface and implementation files supposed=20
> to be named the same and just with different extensions? =20
>=20
> I've attached all three files...thanks.
>=20
> Joe <<compile.cpp>> <<compile.h>> <<main.cpp>>=20
>=20
|
|
From: Opacki, J. <Jos...@ng...> - 2003-09-30 14:23:45
|
I'm still learning so please be patient. I am running into some problems. I've defined my interface file as "compile.h", my implementation file as "compile.cpp", and my application file as "main.cpp". The implementation and application files both contain [ #include "compile.h" ]. However, when I try to compile my application file, I receive numerous linker errors with undefined references to my class. HELP! Am I not understanding the whole seperate file compilation? Isn't the class interface and implementation files supposed to be named the same and just with different extensions? I've attached all three files...thanks. Joe <<compile.cpp>> <<compile.h>> <<main.cpp>> |
|
From: Daniel G. <sp...@ho...> - 2003-09-30 13:40:48
|
How can I find out how much memory my program is using? I'm running it under windows and was wondering if there's a Windows API call or some utility on the net that can latch on to my program and find out how much memory it is actually using. If I'm not being specific enough, tell me. Daniel _________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile |
|
From: Mark S. <mar...@li...> - 2003-09-30 12:22:00
|
Hi all firstly thanks to Yeoh for the dev project files for the static library & bgidemo ( http://www.yeohhs.com/shareware/winbgi_DevCpp.zip ) When I use the outtext() function & run on win2000 the text is in the colour set by setcolor and the background colour is as set by setbkcolour as one would expect, but if I rebuild & run it on a win98 machine the text colour is OK but the background colour goes to black irrespective of what I set the background colour to. Does anyone have a fix or must I live with the performance difference between the OS ? P.S. I'm not familiar with windows API programming :-( TIA Mark --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003 The information contained in this e-mail message (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an addressee, any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited. If you have received this communication in error, please contact us immediately so that we can correct the error. |
|
From: Michal M. <mol...@se...> - 2003-09-30 11:23:56
|
Mark Smith wrote: > dev 4.9.8.1 > > When you start a new project you specify it as C or C++. Once the project > has been defined, is it possible to change it? There is not an option under > project options. > Thanks in advance > Mark Simply change IsCpp=1 to IsCpp=0 (or vice versa) in NameOfYourProject.dev file |
|
From: Per W. <pw...@ia...> - 2003-09-30 11:20:40
|
Sorry, I must have got brain-fever
It should be bit&7 not bit&3
Don't know where the 3 came from in the first example, but then I managed
to continue with it for the test_bit() and clear_bit() functions too...
Am I bad or just a bit tired :-)
The code I sent defined bit 0 as least significant bit of first char, and
bit 7 as most significant bit of first char.
If you want to reverse order of bits within a character, you can use
0x80 >> (bit&7)
Then you will allocate bits from high bit to low in each character.
Also, the bits are zero-relative. If you do set_bit(mybits,2) the relevant
character should contain binary value 00000100 (4 decimal) if you use the
bit order of my example, or 00100000 (32 decimal) if you use the reverse
bit order of (0x80 >> (bit&7)).
/Per W
On Tue, 30 Sep 2003, Christian Sch=E4fer wrote:
> hi Per,
>
> Tuesday, September 30, 2003, 11:25:00 AM, you wrote:
> > First:
> > sizeof(mybits) is just size of pointer - not size of the array in bytes=
or
> > bits.
> yes, my fault. corrected. ;-)
>
> > mybits[bit/8] |=3D 1 << (bit&3);
>
> > isn't so complicated. Each character contains 8 bits. So by dividing bi=
t
> > with 8, I get which character the bit is stored in.
> that was clear.
>
> > bit&3 will use the 3 least significant bits for a numeric range of 0-7.
> understood.
>
> > 1 << (bit&3) will then access one of the 8 bits in the character.
> ok. with you.
>
> everything seems clear to me now. but the out put of my current code,
> will be:
>
> mybits: 0000 0000 0000 0000
> mybits: 0400 0000 0000 0000
>
> this does mean that the first byte changed from
>
> (bin) 00000000 to
> (bin) 00000100
>
> right?
> this should be
>
> (bin) 0100000
> (hex) 40
>
> since I changed the second bit of all, right?
>
> somewhere I made a mistake, I know, but where?
>
>
> char *alloc_bits(unsigned int);
> void set_bit(char*, unsigned int);
> int get_bit(const char*, unsigned int);
> void clear_bit(char*, unsigned int bit);
>
> int main(int argc, char *argv[])
> {
> char *mybits;
>
> mybits =3D alloc_bits(60);
>
> if (mybits) printf("mybits: %X%X %X%X %X%X %X%X (%s)\n", *(mybits+0),=
*(mybits+1), *(mybits+2), *(mybits+3), *(mybits+4), *(mybits+5), *(mybits+=
6), *(mybits+7), mybits);
>
> if (mybits) set_bit(mybits,2);
>
> if (mybits) printf("mybits: %X%X %X%X %X%X %X%X (%s)\n", *(mybits+0),=
*(mybits+1), *(mybits+2), *(mybits+3), *(mybits+4), *(mybits+5), *(mybits+=
6), *(mybits+7), mybits);
>
> system("PAUSE");
> return 0;
> }
>
> char *alloc_bits(unsigned int bits)
> {
> return calloc(((bits+7)/8), sizeof(char));
> }
>
> void set_bit(char *bits,unsigned int bit)
> {
> bits[bit/8] |=3D 1 << (bit&3);
> }
>
> int get_bit(const char *bits, unsigned int bit)
> {
> return ((bits[bit/8] | (1 << (bit&3))) !=3D 0) ? bit : 0;
> }
>
> void clear_bit(char *mybits,unsigned int bit) {
> mybits[bit/8] &=3D ~(1 << (bit&3));
> }
>
>
>
> gruss
> /Christian mailto:ca...@kr...
>
> ---
>
>
> I propose that the following character sequence for joke markers:
>
> :-)
>
> 19-Sep-82 11:44 Scott E Fahlman
>
>
>
> -------------------------------------------------------
> 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://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Mark S. <mar...@li...> - 2003-09-30 11:15:20
|
dev 4.9.8.1 When you start a new project you specify it as C or C++. Once the project has been defined, is it possible to change it? There is not an option under project options. Thanks in advance Mark --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003 The information contained in this e-mail message (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an addressee, any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited. If you have received this communication in error, please contact us immediately so that we can correct the error. |
|
From: <ca...@kr...> - 2003-09-30 10:25:33
|
hi Per,
Tuesday, September 30, 2003, 11:25:00 AM, you wrote:
> First:
> sizeof(mybits) is just size of pointer - not size of the array in bytes or
> bits.
yes, my fault. corrected. ;-)
> mybits[bit/8] |= 1 << (bit&3);
> isn't so complicated. Each character contains 8 bits. So by dividing bit
> with 8, I get which character the bit is stored in.
that was clear.
> bit&3 will use the 3 least significant bits for a numeric range of 0-7.
understood.
> 1 << (bit&3) will then access one of the 8 bits in the character.
ok. with you.
everything seems clear to me now. but the out put of my current code,
will be:
mybits: 0000 0000 0000 0000
mybits: 0400 0000 0000 0000
this does mean that the first byte changed from
(bin) 00000000 to
(bin) 00000100
right?
this should be
(bin) 0100000
(hex) 40
since I changed the second bit of all, right?
somewhere I made a mistake, I know, but where?
char *alloc_bits(unsigned int);
void set_bit(char*, unsigned int);
int get_bit(const char*, unsigned int);
void clear_bit(char*, unsigned int bit);
int main(int argc, char *argv[])
{
char *mybits;
mybits = alloc_bits(60);
if (mybits) printf("mybits: %X%X %X%X %X%X %X%X (%s)\n", *(mybits+0), *(mybits+1), *(mybits+2), *(mybits+3), *(mybits+4), *(mybits+5), *(mybits+6), *(mybits+7), mybits);
if (mybits) set_bit(mybits,2);
if (mybits) printf("mybits: %X%X %X%X %X%X %X%X (%s)\n", *(mybits+0), *(mybits+1), *(mybits+2), *(mybits+3), *(mybits+4), *(mybits+5), *(mybits+6), *(mybits+7), mybits);
system("PAUSE");
return 0;
}
char *alloc_bits(unsigned int bits)
{
return calloc(((bits+7)/8), sizeof(char));
}
void set_bit(char *bits,unsigned int bit)
{
bits[bit/8] |= 1 << (bit&3);
}
int get_bit(const char *bits, unsigned int bit)
{
return ((bits[bit/8] | (1 << (bit&3))) != 0) ? bit : 0;
}
void clear_bit(char *mybits,unsigned int bit) {
mybits[bit/8] &= ~(1 << (bit&3));
}
gruss
/Christian mailto:ca...@kr...
---
I propose that the following character sequence for joke markers:
:-)
19-Sep-82 11:44 Scott E Fahlman
|