dev-cpp-users Mailing List for Dev-C++ (Page 19)
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: Abhijeet M. <col...@gm...> - 2009-03-02 17:48:24
|
Dear Friends, I am a very regular user of Dev C++ and i want to compile the CVBlob library and use the same in my projects ...I will tell you what all steps i followed 1. Downloaded Cmake 2. placed the opencv cmake in the "config" folder of cmake installaion 3. created a project in Dev CPP and included cvblob.h and CMakeLists.txt and what all files are necessary in the directory take a look what cmake says... CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C_COMPILER_ENV_VAR CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: please tell me how to calibrate the cmake software so that i can compile the cvblob library for my projects.... I think i need to modify cmakelists.txt myself but i do not know how to do it...I do not want all i have done to go a waste.. Sincerely, Abhijeet. |
From: João M. R. S. T. <ta...@fe...> - 2009-02-22 18:02:47
|
---------------------------------------------------------------------------- ------------------------ (Apologies for cross-posting) International ECCOMAS Thematic Conference VipIMAGE 2009 - II ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING 14-16th October 2009, FEUP, Porto, Portugal www.fe.up.pt/vipimage Call For Thematic Sessions And Papers We would appreciate if you could distribute this information by your colleagues and co-workers. ---------------------------------------------------------------------------- ------------------------- Dear Colleague, We are glad to announce the International Conference VipIMAGE 2009 - II ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING will be held in the Faculty of Engineering of University of Porto, Porto, Portugal, on October 14-16, 2009. Possible Topics (not limited to) Image Processing and Analysis Segmentation, Tracking and Analyze of Objects in Images 3D Vision Signal Processing Data Interpolation, Registration, Acquisition and Compression Objects Simulation Virtual Reality Software Development for Image Processing and Analysis Computer Aided Diagnosis, Surgery, Therapy and Treatment Computational Bioimaging and Visualization Telemedicine Systems and their Applications Invited Lecturers Alejandro Frangi - Pompeu Fabra University, Spain Christos E. Constantinou - Stanford University School of Medicine, USA Demetri Terzopoulos - University of California, USA Joaquim A. Jorge - Instituto Superior Técnico, Portugal José Carlos Príncipe - University of Florida, USA Lionel Moisan - Université Paris V, France Tony Chan - University of California, USA Thematic Sessions Proposals to organize Thematic Session within VipIMAGE 2009 are mostly welcome. The organizers of the selected thematic sessions will be included in the conference scientific committee and will have a reduced registration fee. They will be responsible for the dissemination of their thematic session, may invite expertise researches to have invited keynotes during their session and will participate in the review process of the submitted contributions. Proposals for Thematic Sessions should be submitted by email to the conference co-chairs (ta...@fe..., rn...@fe...). Confirmed Thematic Sessions (not yet closed) - Texture Image Analysis: Methods and Applications - Processing and Classification of Satellite Imagery - Small Animal Imaging: Trends and Techniques - Imaging of Biological Flows: Trends and Challenges Publications The proceedings book is going to be published by the Taylor & Francis Group, as happened with VipIMAGE 2007 (ISBN: 9780415457774). The organizers will encourage the submission of extended versions of the accepted papers to related International Journals; in particular for special issues dedicated to the conference. One possibility already confirmed is the International Journal for Computational Vision and Biomechanics (IJCV&B). Following the success of VipIMAGE 2007, the organizers are going to too edit a book to be published by SPRINGER (ISBN: 978-1-4020-9085-1), under the Computational Methods in Applied Sciences series, with invited works from the most important ones presented in the conference. Awards "best paper award" and "best student paper award" are going to be given to the author(s) of two papers presented at the conference, selected by the Organizing Committee based on the best combined marks from the Scientific Committee and Session Chairs. Important dates Deadline for Thematic Sessions proposals: March 1, 2009 (extended) Submission of extended abstracts: March 15, 2009 Lectures and Final Papers: June 15, 2009 We are looking forward to see you in Porto next October. Kind regards, João Manuel R. S. Tavares Renato Natal Jorge (conference co-chairs) PS. For further details, please see the conference website at: www.fe.up.pt/vipimage |
From: angel d. <sci...@ho...> - 2009-02-19 19:14:32
|
Hello, I am having an issue with C++ classes, I am created 2 classes. The first class has a method that receives a function as a parameter and the second class has another fuction that prints to the screen "hello". The second class inherits the first one and tries to use the first class function passing the second class function as the parameter. For example: #include <iostream> #include <windows.h> using namespace std; class one { public: DWORD WINAPI Me(DWORD WINAPI(*func_var)(LPVOID)); }; DWORD WINAPI Me(DWORD WINAPI(*func_var)(LPVOID)) { //do some other things with the function being pass as a parameter } class two : one { public: DWORD WINAPI hello(LPVOID arg); void PrintHello(); }; DWORD WINAPI two::hello(LPVOID arg) { cout<<"hello"; } void two::PrintHello() { Me(hello); //instead of calling the hello method directly I want to pass it to the 'one' class } int main(int argc, char *argv[]) { system("PAUSE"); return EXIT_SUCCESS; } I get this error: no matching function for call to `two::Me(<unknown type>)' candidates are: DWORD one::Me(DWORD (*)(void*)) What can I do for me to be able to pass the function? Thanks... _________________________________________________________________ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008 |
From: André M. B. <and...@su...> - 2009-02-19 14:15:16
|
Dear users, I will need to develop an larg app and I´m interested to work with multiple modules. In these modules I want to define both functions and variables. Because of this I wrote a dummy example to check if it is all right. Please take a look at codes and answer me one question: if the codes are ok, when I need to use the extern qualifier? Best Regards André -->main.c #include <stdio.h> #include <stdlib.h> #include "sum.h" #include "dif.h" int main() { int a, b, c; printf("Enter a-->"); scanf("%d", &a); printf("Enter b-->"); scanf("%d", &b); sr = sum(a, b); dr = dif(a, b); printf("The sum is %d\n", sr); printf("The difference is %d\n", dr); system("PAUSE"); return 0; } -->sum.h int sr; int sum(int, int); -->dif.h int dr; int dif(int, int); -->sum.c int sum(int x, int y) { return(x + y); } -->dif.c int dif(int x, int y) { return(x - y); } |
From: vivek <vi...@ya...> - 2009-02-18 17:05:30
|
Hi, Where i can find the FAQ before positing my query. Please give me the link. Regards vivek |
From: Reid T. <rei...@at...> - 2009-02-04 23:56:57
|
Heedle Blambeedle wrote: > Here is my code: > > #include <iostream> > > using namespace std; > > int main () > { > int n; > int div = 0; > bool primenum = true; > cout << "Enter an integer: "; > cin >> n; > do { > div = div + 1; the error is on this line vvvvvvvvvvvvvvvvvvvvvvvvvvvv > if (n % div = 0) > { > cout << "Divisible By " << div << " ." << endl; > primenum = false; > } > if (n % div != 0) > { > cout << "Not Divisible By" << div << " ." << endl; > } > } while (div <= n / 2 + 1); */_/* this line has the error*/_/* > if (primenum == false) > { > cout << "IS PRIME." << endl; > } > if (primenum == true) > { > cout << "IS NOT PRIME." << endl; > } > system("pause > nul"); > return (0); > } > > And here is my question: > > I recieve a non-lvalue error in the line with "this line has the error". > > What the heck is a non-lvalue error and how do I fix it? > > My system specs (though I don't think they'll matter) : > > Microsoft Windows XP > Service Pack 3 > > Intel Pentium 4 > 504 MB RAM > 3.06 GHZ of processing > > > Thank you so much. > > Heedle > > P.S. Please don't disregard my questions because there are so many of > them. I say again, I am new to C++. > |
From: Heedle B. <hee...@gm...> - 2009-02-04 22:18:55
|
When I select a Windows Console it displays a bunch of code... Where does mine go? |
From: Iván S. L. <iva...@gm...> - 2009-02-04 20:26:53
|
You may want to mean if (n % div == 0) instead of if (n % div = 0) Unfortunately, compilers not always says the truth! Greetings. Ivan. Heedle Blambeedle wrote: > Here is my code: > > #include <iostream> > > using namespace std; > > int main () > { > int n; > int div = 0; > bool primenum = true; > cout << "Enter an integer: "; > cin >> n; > do { > div = div + 1; > if (n % div = 0) > { > cout << "Divisible By " << div << " ." << endl; > primenum = false; > } > if (n % div != 0) > { > cout << "Not Divisible By" << div << " ." << endl; > } > } while (div <= n / 2 + 1); */_/* this line has the error*/_/* > if (primenum == false) > { > cout << "IS PRIME." << endl; > } > if (primenum == true) > { > cout << "IS NOT PRIME." << endl; > } > system("pause > nul"); > return (0); > } > > And here is my question: > > I recieve a non-lvalue error in the line with "this line has the error". > > What the heck is a non-lvalue error and how do I fix it? > > My system specs (though I don't think they'll matter) : > > Microsoft Windows XP > Service Pack 3 > > Intel Pentium 4 > 504 MB RAM > 3.06 GHZ of processing > > > Thank you so much. > > Heedle > > P.S. Please don't disregard my questions because there are so many of > them. I say again, I am new to C++. > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > ------------------------------------------------------------------------ > > _______________________________________________ > 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: Frederico M. <the...@ho...> - 2009-02-04 11:19:50
|
Hi Robert ;) Even though you are right, as those are the best aproches to the specified problem, thoses solutions have already been presented to the member(Sleep at least was). I find it improbable that the person who asked the original question hadn't already tried thoses solutions. In regarding with your rules, the Posix/SO especific function if far better than the implementation I presented as, I do understand that my implementation is wastefull. It spends to many cicles resolving the same equation to determine the elapsed time. But also I must say I am unaware of POSIX timer functions implemented in windows. If you know, please let me know, as it would be usefull for me as well. In relation to the original poster, I understood that the resulting binary application must run in win95/MS-DOS. If so, Sleep/SleepEx, the SO native functions are not usefull, because Sleep was implemented in win2000. Probably there are similar functions that I am unaware, that were implemented back in Win95 time, but I was unable to find information at this time. With that being said, however, my intention was not to present the snippet as the best aproche, only as one of many. But, in regarding with rule 1, I don't see why you cannot implement the same class, only modifying where is needed. ( Eg.: the function pair timeout ()/wait(). ) Thank you for the constructive criticism, nonetheless ^^ Frederico Marques> Date: Wed, 4 Feb 2009 05:45:39 -0500> From: ral...@gm...> To: the...@ho...> CC: dev...@li...> Subject: Re: [Dev-C++] Sleep / for specified time delay :( ?> > Please for the sake of yourself and the sanity of anyone who later may> need to debug or modify your code.> Please keep it simple and flexible by following two rules.> > 1) Create a customer Function, for example customerSleep(X) where X is> clock ticks, nano seconds, seconds, minutes, etc... what ever you> need.> 2a) Check the major standards for something that does what you need> and use that if at all possible in side your customer function.> 2b)I would suggest posix standard, sleep if you don't need a precise> delay, otherwise use the timeout feature of poll system call.> 3c)If for some reason neither of those work, use something for your OS.> > Following rule 1 will mean that you only need to make adjustments in> one place if you need to fix/change or port the delay to another> platform, or version, etc...> > Following the second rule will mean that it's more likely you won't> need to make a fixes/changes for bugs or ports.> > Hope this helps,> Robert> > On Wed, Feb 4, 2009 at 4:54 AM, Frederico Marques> <the...@ho...> wrote:> > Hey...> > (* first, for those u are C++ coders, i apologize, i'll be murdering C++> > below... if you have a faint heart, please look away! :P *)> > You can either use Sleep for windows... which works very well for most> > cases, or you can do something like :> >> > snippet :> > ---------------------------------------------------------> > #include <time.h>> >> > class DeltaTime {> > clock_t init;> > unsigned delta;> > public :> > DeltaTime( float sec = 1 ) { setDelta( sec ); }> > void setDelta( float sec ) { delta = CLK_TCK * sec; }> > void start() { init = clock(); }> > bool timeout() { return clock() - init >= delta; }> > void wait() { while (!timeout()) ; }> > }> > --------------------------------------------------------------------> >> > Usage :> > snippet :> > --------------------------------------------------------------------> >> > DeltaTime timer( 10 ) ;> > timer.start();> > timer.wait();> > --------------------------------------------------------------------> >> >> > Of course u can tweak it to make it more "easy" ... and, you can> > introduce some linked list of function pointers, that iterate while the code> > is in wait/timeout. Its "limitless" ^^.> >> >> > Frederico Marques> >> >> >> >> >> > ________________________________> > Date: Tue, 3 Feb 2009 22:06:55 +0200> > From: gx...@gm...> > To: dev...@li...> > Subject: [Dev-C++] Sleep / for specified time delay :( ?> >> > Hi,> >> > I want to make a delay/pause in C++, in Dev-C++... Does somebody know how to> > do that ? An example ?> >> > Thanks.> >> >> > ________________________________> > Diversão em dobro: compartilhe fotos enquanto conversa usando o Windows Live> > Messenger.> > ------------------------------------------------------------------------------> > Create and Deploy Rich Internet Apps outside the browser with> > Adobe(R)AIR(TM)> > software. With Adobe AIR, Ajax developers can use existing skills and code> > to> > build responsive, highly engaging applications that combine the power of> > local> > resources and data with the reach of the web. Download the Adobe AIR SDK and> > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com> > _______________________________________________> > 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> >> >> > ------------------------------------------------------------------------------> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)> software. With Adobe AIR, Ajax developers can use existing skills and code to> build responsive, highly engaging applications that combine the power of local> resources and data with the reach of the web. Download the Adobe AIR SDK and> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com> _______________________________________________> 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 _________________________________________________________________ Conheça o Windows Live Spaces, a rede de relacionamentos do Messenger! http://www.amigosdomessenger.com.br/ |
From: Robert A. <ral...@gm...> - 2009-02-04 10:45:44
|
Please for the sake of yourself and the sanity of anyone who later may need to debug or modify your code. Please keep it simple and flexible by following two rules. 1) Create a customer Function, for example customerSleep(X) where X is clock ticks, nano seconds, seconds, minutes, etc... what ever you need. 2a) Check the major standards for something that does what you need and use that if at all possible in side your customer function. 2b)I would suggest posix standard, sleep if you don't need a precise delay, otherwise use the timeout feature of poll system call. 3c)If for some reason neither of those work, use something for your OS. Following rule 1 will mean that you only need to make adjustments in one place if you need to fix/change or port the delay to another platform, or version, etc... Following the second rule will mean that it's more likely you won't need to make a fixes/changes for bugs or ports. Hope this helps, Robert On Wed, Feb 4, 2009 at 4:54 AM, Frederico Marques <the...@ho...> wrote: > Hey... > (* first, for those u are C++ coders, i apologize, i'll be murdering C++ > below... if you have a faint heart, please look away! :P *) > You can either use Sleep for windows... which works very well for most > cases, or you can do something like : > > snippet : > --------------------------------------------------------- > #include <time.h> > > class DeltaTime { > clock_t init; > unsigned delta; > public : > DeltaTime( float sec = 1 ) { setDelta( sec ); } > void setDelta( float sec ) { delta = CLK_TCK * sec; } > void start() { init = clock(); } > bool timeout() { return clock() - init >= delta; } > void wait() { while (!timeout()) ; } > } > -------------------------------------------------------------------- > > Usage : > snippet : > -------------------------------------------------------------------- > > DeltaTime timer( 10 ) ; > timer.start(); > timer.wait(); > -------------------------------------------------------------------- > > > Of course u can tweak it to make it more "easy" ... and, you can > introduce some linked list of function pointers, that iterate while the code > is in wait/timeout. Its "limitless" ^^. > > > Frederico Marques > > > > > > ________________________________ > Date: Tue, 3 Feb 2009 22:06:55 +0200 > From: gx...@gm... > To: dev...@li... > Subject: [Dev-C++] Sleep / for specified time delay :( ? > > Hi, > > I want to make a delay/pause in C++, in Dev-C++... Does somebody know how to > do that ? An example ? > > Thanks. > > > ________________________________ > Diversão em dobro: compartilhe fotos enquanto conversa usando o Windows Live > Messenger. > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code > to > build responsive, highly engaging applications that combine the power of > local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > 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: Frederico M. <the...@ho...> - 2009-02-04 09:54:30
|
Hey... (* first, for those u are C++ coders, i apologize, i'll be murdering C++ below... if you have a faint heart, please look away! :P *)You can either use Sleep for windows... which works very well for most cases, or you can do something like : snippet : ---------------------------------------------------------#include <time.h>class DeltaTime { clock_t init; unsigned delta; public : DeltaTime( float sec = 1 ) { setDelta( sec ); } void setDelta( float sec ) { delta = CLK_TCK * sec; } void start() { init = clock(); } bool timeout() { return clock() - init >= delta; } void wait() { while (!timeout()) ; }} -------------------------------------------------------------------- Usage : snippet : -------------------------------------------------------------------- DeltaTime timer( 10 ) ;timer.start(); timer.wait(); -------------------------------------------------------------------- Of course u can tweak it to make it more "easy" ... and, you can introduce some linked list of function pointers, that iterate while the code is in wait/timeout. Its "limitless" ^^. Frederico Marques Date: Tue, 3 Feb 2009 22:06:55 +0200From: gx...@gm...To: dev...@li...Subject: [Dev-C++] Sleep / for specified time delay :( ?Hi,I want to make a delay/pause in C++, in Dev-C++... Does somebody know how to do that ? An example ?Thanks. _________________________________________________________________ Cansado de espaço para só 50 fotos? Conheça o Spaces, o site de relacionamentos com até 6,000 fotos! http://www.amigosdomessenger.com.br |
From: Heedle B. <hee...@gm...> - 2009-02-04 02:18:16
|
Here is my code: #include <iostream> using namespace std; int main () { int n; int div = 0; bool primenum = true; cout << "Enter an integer: "; cin >> n; do { div = div + 1; if (n % div = 0) { cout << "Divisible By " << div << " ." << endl; primenum = false; } if (n % div != 0) { cout << "Not Divisible By" << div << " ." << endl; } } while (div <= n / 2 + 1); */* this line has the error*/* if (primenum == false) { cout << "IS PRIME." << endl; } if (primenum == true) { cout << "IS NOT PRIME." << endl; } system("pause > nul"); return (0); } And here is my question: I recieve a non-lvalue error in the line with "this line has the error". What the heck is a non-lvalue error and how do I fix it? My system specs (though I don't think they'll matter) : Microsoft Windows XP Service Pack 3 Intel Pentium 4 504 MB RAM 3.06 GHZ of processing Thank you so much. Heedle P.S. Please don't disregard my questions because there are so many of them. I say again, I am new to C++. |
From: Derek C. <de...@ci...> - 2009-02-03 23:55:29
|
The language works you know, it's been around a bit! You need to put a^b in parentheses because of operator precedence. int main() { char a = 'A'; char b = 'Z'; cout << static_cast<char>(a ^ b) << endl; system("pause"); } Omit the cast if you want the output as a number rather than a character. This is because the default type of any expression involving chars is actually int. On Tue, Feb 3, 2009 at 11:33 PM, Heedle Blambeedle <hee...@gm...> wrote: > XOR is this character: ^. It does not seem to operate in DevC++. When I > attempt to compile this: > > #include <iostream> > using namespace std; > #define PI 3.14159 > #define NEWLINE '\n' > int main () > { > char a; > char b; > cout << a ^ b << endl; > system("pause"); > } > > I get this error: > > invalid operands of types `char' and `<unknown type>' to binary `operator<<' > > Is there a solution to this? > > Heedle. > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code > to > build responsive, highly engaging applications that combine the power of > local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > 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: Derek C. <de...@ci...> - 2009-02-03 23:35:03
|
In what context? Console app or Windows? On Tue, Feb 3, 2009 at 8:06 PM, George Petculescu <gx...@gm...> wrote: > Hi, > > I want to make a delay/pause in C++, in Dev-C++... Does somebody know how to > do that ? An example ? > > Thanks. > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code > to > build responsive, highly engaging applications that combine the power of > local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > 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: Heedle B. <hee...@gm...> - 2009-02-03 23:33:58
|
XOR is this character: ^. It does not seem to operate in DevC++. When I attempt to compile this: #include <iostream> using namespace std; #define PI 3.14159 #define NEWLINE '\n' int main () { char a; char b; cout << a ^ b << endl; system("pause"); } I get this error: invalid operands of types `char' and `<unknown type>' to binary `operator<<' Is there a solution to this? Heedle. |
From: Philip B. <ph...@bl...> - 2009-02-03 22:35:09
|
Hi, The answer to the first question is simple, Ms Dos cannot run Windows programs. As for backwards compatibility with Windows 95, I don't believe that MinGw creates incompatible binaries; it's simply got to do with what functions you use. When you say it doesn't work, what happens exactly when you try to run your app on Win95? You need to provide a little more information in order for us to help you. Regards Philip Bennefall ----- Original Message ----- From: George Petculescu To: dev-cpp-users Sent: Tuesday, February 03, 2009 9:47 PM Subject: [Dev-C++] Compatibility problem .. ? HI, I have developed a C-based program with Dev-C++ 4.9.9.2 ... It doesn't run in MS-DOS (7.10) or Windows 95... May cause this the older of this operating systems ? Is there anyway to run / convert for those OS ? Please, I really need help. It should be a way to run on them ... I think... Thanks. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com ------------------------------------------------------------------------------ _______________________________________________ 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 - www.avg.com Version: 8.0.233 / Virus Database: 270.10.17/1931 - Release Date: 02/02/09 19:21:00 |
From: George P. <gx...@gm...> - 2009-02-03 20:47:08
|
HI, I have developed a C-based program with Dev-C++ 4.9.9.2 ... It doesn't run in MS-DOS (7.10) or Windows 95... May cause this the older of this operating systems ? Is there anyway to run / convert for those OS ? Please, I really need help. It should be a way to run on them ... I think... Thanks. |
From: George P. <gx...@gm...> - 2009-02-03 20:06:58
|
Hi, I want to make a delay/pause in C++, in Dev-C++... Does somebody know how to do that ? An example ? Thanks. |
From: matheus r. <mfr...@gm...> - 2009-02-03 19:27:44
|
hi, DEV C++ is just an IDE. What you want is a function from the C/C++ libraries you are using. For example, std C lib provides a scanf function which can make your program wait for user input. Windows also provides a pause function IIRC. The following code in C++ will also wait for user input: #include <iostream> // some code... int temp; std::cin >> temp; // more code... 2009/2/3 George Petculescu <gx...@gm...> > Hi, > > In C++ (Dev-C++) is any action like to delay the execution of actions... > pause, delay ? > > Thanks > |
From: George P. <gx...@gm...> - 2009-02-03 19:20:35
|
Hi, In C++ (Dev-C++) is any action like to delay the execution of actions... pause, delay ? Thanks |
From: edison i. <edi...@gm...> - 2009-02-03 18:39:45
|
Hi, let me be added onto your mailing list so that i can get updates. Eddy. |
From: George P. <gx...@gm...> - 2009-02-03 16:38:54
|
HI, How can I set a string to upper case in Dev-C++ ? Thanks |
From: J H. <jsh...@ho...> - 2009-02-03 02:07:47
|
Heedle, I promise I wont needle you about your name.. Use a system("pause"); And basically after the program runs, it will ask you to press any key to continue. This only works on windows machines though, and some will suggest that you program a response to a question in order to make your program portable... From: Heedle Blambeedle [mailto:hee...@gm...] Sent: Monday, February 02, 2009 5:29 PM To: Dev...@li... Subject: [Dev-C++] Compiler Ineffective I made a program yesterday. I compiled it to an EXE file, but when I ran it, the window didn't stay up and I couldn't see what it did. This is the code of a basic program I made that doesn't stay open. #include <iostream> using namespace std; int main () { cout << "Hello World!"; return 0; } Do I need a pause in there? Is there a piece of code at the beginning I don't know about? If I am missing anything or if it is natural, please tell me. Thank you! Heedle P.S. This is my first time on this list. P.S.S. Don't make fun of my name please. I know it sucks and I don't need you to rub it in. P.S.S.S. Don't take offense at the previous sentence. It is just preliminary in case anybody does make fun of it. |
From: Heedle B. <hee...@gm...> - 2009-02-03 01:29:22
|
I made a program yesterday. I compiled it to an EXE file, but when I ran it, the window didn't stay up and I couldn't see what it did. This is the code of a basic program I made that doesn't stay open. *#include <iostream> using namespace std; int main () { cout << "Hello World!"; return 0; }* Do I need a pause in there? Is there a piece of code at the beginning I don't know about? If I am missing anything or if it is natural, please tell me. Thank you! Heedle P.S. This is my first time on this list. P.S.S. Don't make fun of my name please. I know it sucks and I don't need you to rub it in. P.S.S.S. Don't take offense at the previous sentence. It is just preliminary in case anybody does make fun of it. |
From: Mr. B. C. P. <phu...@gm...> - 2009-02-02 02:14:09
|
Eddy, You're most welcome. It will be our pleasure to share our experience with you in Dev-C++ programming. BIJOY |