dev-cpp-users Mailing List for Dev-C++ (Page 4)
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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1
|
2
|
3
|
4
(2) |
5
(5) |
6
(12) |
7
(9) |
8
(2) |
9
|
10
(6) |
11
(6) |
12
(7) |
13
(3) |
14
(8) |
15
(1) |
16
(2) |
17
(3) |
18
|
19
(10) |
20
(4) |
21
|
22
(3) |
23
(1) |
24
(1) |
25
|
26
(1) |
27
|
28
|
29
|
30
|
31
|
|
|
|
|
|
From: Lloyd <ll...@cd...> - 2007-12-06 13:11:54
|
Hi, I want to write an extendable application where new classes can be added with out modifying an existing code. Let me brief it with an example. I am writing a network packet dissector. Each packet may consist of so many protocols in a hierarchical manner. We will know the protocol in level 'n' from the 'n-1' th level. Though there are hundreds of protocols we must be able to add new protocols without modifying the existing code. So when we are on protocol at level 'n', it must be able to determine the protocol at level 'n+1' and create the object. how can I do this? my present implementation would be like this func_proto(int ProtocolType) { switch(ProtocolType) { case IP: DissectProto(IP); case ARP: DissectProto(ARP); .... } } DissectProto(int type) { //Extract info from packet... ...... // Determine the type of protcol in the next level .... //call func_proto with identified protocol type func_proto(ProtocolType); } Here I would have to add new cases as we add new protocol dissectors, Instead of that can I use any better way? Thank you very much Lloyd ______________________________________ Scanned and protected by Email scanner |
From: Per W. <pw...@ia...> - 2007-12-06 10:43:12
|
A cheaper form of mutex for Win32 applications are the critical sections. In some situations a semaphore may be suitable. /pwm On Wed, 5 Dec 2007, Chris Miller wrote: > On Dec 5, 2007 1:10 PM, Jessica Chen <jes...@gm...> wrote: > > My whole projects have two thread. > > one thread is reading RS-232 communication port. > > another thread is Win32 GUI to display the data got from RS-232 > > communication port. > > > > The design I had is: > > Buttons on Win32 GUI. > > So when the button is clicked, the corresponding data is read from RS232 > > thread, and display in the GUI thread. > > > > BUT I want to have a constantly updated display. That is, there is NO > > button to trigger the data update. > > When the data of RS232 thread is updated, my display of GUI thread need to > > be updated. > > What should I design? > > > > My consideration for the design is: > > add a constant interval timer to trigger the data update. > > but how to implement it? > > and do you have any other good idea? > > A commonly used technique is to have the GUI thread check the reader > thread every X miliseconds. This requires that you use a mutex to > lock the data while it's being read, otherwise you might incur the > wrath of undefined behavior when reading memory that's currently being > written to. > > What if you had a dual-core CPU, and you managed to send a read > request exactly when you sent a write request? Something tells me > that's not possible because of the mutexes in the lower-level > implementation, but it would be interesting to see which request the > memory controller disregards. > > > I'm not sure how to implement a mutex in a Win32 thread, however, > pthreads is only a wrapper on top of Win32, so it can be done (I > didn't notice any special code in the pthreads sources when I glossed > over them). > > -- > Registered Linux Addict #431495 > http://profile.xfire.com/mrstalinman > John 3:16! > If Microsoft is the Wal*Mart of the Software World, then Linux is the Home Depot > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > 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: Per W. <pw...@ia...> - 2007-12-06 10:41:20
|
One alternative is to let the RS232 thread send messages to the GUI thread. Either with the serial data, or just as information that there are serial data available. /pwm On Wed, 5 Dec 2007, Jessica Chen wrote: > My whole projects have two thread. > one thread is reading RS-232 communication port. > another thread is Win32 GUI to display the data got from RS-232 > communication port. > > The design I had is: > Buttons on Win32 GUI. > So when the button is clicked, the corresponding data is read from RS232 > thread, and display in the GUI thread. > > BUT I want to have a constantly updated display. That is, there is NO > button to trigger the data update. > When the data of RS232 thread is updated, my display of GUI thread need to > be updated. > What should I design? > > My consideration for the design is: > add a constant interval timer to trigger the data update. > but how to implement it? > and do you have any other good idea? > |
From: Ben M. <ili...@at...> - 2007-12-06 03:56:46
|
I was wondering if anyone may be able to tell me whether I can use winsock with dev? im not sure how to link to wsock32.lib |
From: Chris M. <lor...@gm...> - 2007-12-05 22:32:54
|
On Dec 5, 2007 1:10 PM, Jessica Chen <jes...@gm...> wrote: > My whole projects have two thread. > one thread is reading RS-232 communication port. > another thread is Win32 GUI to display the data got from RS-232 > communication port. > > The design I had is: > Buttons on Win32 GUI. > So when the button is clicked, the corresponding data is read from RS232 > thread, and display in the GUI thread. > > BUT I want to have a constantly updated display. That is, there is NO > button to trigger the data update. > When the data of RS232 thread is updated, my display of GUI thread need to > be updated. > What should I design? > > My consideration for the design is: > add a constant interval timer to trigger the data update. > but how to implement it? > and do you have any other good idea? A commonly used technique is to have the GUI thread check the reader thread every X miliseconds. This requires that you use a mutex to lock the data while it's being read, otherwise you might incur the wrath of undefined behavior when reading memory that's currently being written to. What if you had a dual-core CPU, and you managed to send a read request exactly when you sent a write request? Something tells me that's not possible because of the mutexes in the lower-level implementation, but it would be interesting to see which request the memory controller disregards. I'm not sure how to implement a mutex in a Win32 thread, however, pthreads is only a wrapper on top of Win32, so it can be done (I didn't notice any special code in the pthreads sources when I glossed over them). -- Registered Linux Addict #431495 http://profile.xfire.com/mrstalinman John 3:16! If Microsoft is the Wal*Mart of the Software World, then Linux is the Home Depot |
From: Jessica C. <jes...@gm...> - 2007-12-05 21:47:49
|
Yep...that is what I need. Thanks so much. I got what I really want by your suggestion. Here is that part of code which works fine. :-) BOOL CALLBACK DlgProc1(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_INITDIALOG: SetTimer(hwnd, 1, 500, NULL); return TRUE; case WM_TIMER: switch(wParam) { case 1: DlgEvent(hwnd); break; } break; case WM_COMMAND: switch(wParam) { case IDOK: DestroyWindow(hwnd); return TRUE; } break; case WM_DESTROY: KillTimer(hwnd,1); PostQuitMessage(0); break; } // end of 'switch' for msg return FALSE; } On Dec 5, 2007 4:07 PM, Rick Robinson <rro...@it...> wrote: > I believe your looking for the SetTimer function and trap the WM_TIMER > message in your callback. > > Rick > > Jessica Chen wrote: > > in Unix, we can use setitimer() to set interval timer. > > thus, when the timer expires, an SIGALRM is sent out. > > > > i don't know if there's similar timer setting in Win32? > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > SF.Net email is sponsored by: The Future of Linux Business White Paper > > from Novell. From the desktop to the data center, Linux is going > > mainstream. Let it simplify your IT future. > > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > 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 > > > > ------------------------------------------------------------------------ > > > > No virus found in this incoming message. > > Checked by AVG Free Edition. > > Version: 7.5.503 / Virus Database: 269.16.14/1172 - Release Date: > 12/5/2007 8:41 AM > > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > 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: Jessica C. <jes...@gm...> - 2007-12-05 21:11:03
|
My whole projects have two thread. one thread is reading RS-232 communication port. another thread is Win32 GUI to display the data got from RS-232 communication port. The design I had is: Buttons on Win32 GUI. So when the button is clicked, the corresponding data is read from RS232 thread, and display in the GUI thread. BUT I want to have a constantly updated display. That is, there is NO button to trigger the data update. When the data of RS232 thread is updated, my display of GUI thread need to be updated. What should I design? My consideration for the design is: add a constant interval timer to trigger the data update. but how to implement it? and do you have any other good idea? |
From: Rick R. <rro...@it...> - 2007-12-05 21:07:25
|
I believe your looking for the SetTimer function and trap the WM_TIMER message in your callback. Rick Jessica Chen wrote: > in Unix, we can use setitimer() to set interval timer. > thus, when the timer expires, an SIGALRM is sent out. > > i don't know if there's similar timer setting in Win32? > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > ------------------------------------------------------------------------ > > _______________________________________________ > 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 > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.16.14/1172 - Release Date: 12/5/2007 8:41 AM > |
From: Jessica C. <jes...@gm...> - 2007-12-05 21:00:57
|
in Unix, we can use setitimer() to set interval timer. thus, when the timer expires, an SIGALRM is sent out. i don't know if there's similar timer setting in Win32? |
From: Axel B. <axe...@ya...> - 2007-12-04 17:07:24
|
In the hpp the line:=0A void Meow () {std::cout << "Meow.\n"; // inli= ne=0Aneeds '};' on the end of line=0A void Meow () {std::cout << "Meo= w.\n";}; // inline=0A=0AAdditional Dev-C++ give me errors on those lines:= =0A cout << "Frisky is a cat who is ";=0A cout << Frisky.GetAge() << = " years old.\n";=0A cout << "Now Frisky is "=0A=0Ayou need to put std::c= out not cout (i just resolve the error this way ^_^ )=0A std::cout << "F= risky is a cat who is ";=0A=0A std::cout << Frisky.GetAge() << " years o= ld.\n";=0A=0A std::cout << "Now Frisky is "=0A=0ABest regards with C++.= =0ABye.=0A=0A=0A=0A=0A Los referentes m=C3=A1s importantes en compra/ = venta de autos se juntaron:=0ADemotores y Yahoo!=0AAhora comprar o vender t= u auto es m=C3=A1s f=C3=A1cil. Vist=C3=A1 ar.autos.yahoo.com/ |
From: <rus...@ao...> - 2007-12-04 16:31:40
|
Hi, I must be missing something. I looked through the book and am 99% that the code's correct (teach yourself c++ in 24hrs by Jesse Liberty). The program is listed on pages 125-126. However when I try to compile it I get the 'Cat::Cat(int)' has already been declared and a parse error at the end of the input. I'm stumped. The two files are in the zip file. http://rhzenvironmental.com/header.zip ________________________________________________________________________ More new features than ever. Check out the new AOL Mail ! - http://o.aolcdn.com/cdn.webmail.aol.com/mailtour/aol/en-us/text.htm?ncid=aolcmp00050000000003 |