dev-cpp-users Mailing List for Dev-C++ (Page 35)
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: Chris M. <lor...@gm...> - 2008-03-12 17:16:04
|
On Wed, Mar 12, 2008 at 9:07 AM, sam Ruma <as...@ya...> wrote: > Wow…! No one has any idea where to find such a book (Windows Programming > with dev-cpp). That is really weird. Dev-C++ is an IDE. Try Windows programming with MinGW instead. -- Registered Linux Addict #431495 http://profile.xfire.com/mrstalinman | John 3:16! http://www.fsdev.net/ | http://www.sauron.fsdev.net/ |
From: Eric <eri...@wo...> - 2008-03-12 17:01:45
|
Why the HTML email? ----- Original Message ----- From: sam Ruma To: dev...@li... Sent: Wednesday, 12 March, 2008 8:22 AM Subject: [Dev-C++] dev-cpp I have installed dev-cpp on Windows XP. I try to install the same version on Vista, but it did not work. Is there another version for Vista? |
From: Eric <eri...@wo...> - 2008-03-12 16:59:39
|
Well I went too Amazon.com and got Your search "Windows Programming with dev-cpp" did not match any products. & Your search "dev-cpp" did not match any products. ----- Original Message ----- From: sam Ruma To: dev...@li... Sent: Wednesday, 12 March, 2008 8:07 AM Subject: [Dev-C++] Dev-cpp Book Wow.! No one has any idea where to find such a book (Windows Programming with dev-cpp). That is really weird. |
From: sam R. <as...@ya...> - 2008-03-12 16:23:05
|
I have installed dev-cpp on Windows XP. I try to install the same version on Vista, but it did not work. Is there another version for Vista? --------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search. |
From: sam R. <as...@ya...> - 2008-03-12 16:07:56
|
Wow ! No one has any idea where to find such a book (Windows Programming with dev-cpp). That is really weird. --------------------------------- Never miss a thing. Make Yahoo your homepage. |
From: sam R. <as...@ya...> - 2008-03-11 12:02:02
|
Hello everyone, Can someone tell me where to find a book about Windows Programming with dev-cpp? --------------------------------- Never miss a thing. Make Yahoo your homepage. |
From: Vamsi K. K. <vam...@gm...> - 2008-03-10 19:28:45
|
hi do u have the date of joining for each employee. if your answer is yes, then the one who joined first will be the oldest employee. and about the tax u need to calculate all with the employee salary and the number of years or days he is working. On Mon, Mar 10, 2008 at 11:51 AM, KSB1265 <ks...@ao...> wrote: > Hey all: > > I am writing a program using C++ that computes employee info. How do I > calculate the oldest employee and the employee with the most tax? I am also > having a problem calculating the taxes. I have been trying with this for a > while now. Please help. Thanks. > > ------------------------------ > Supercharge your AIM. Get the AIM toolbar<http://download.aim.com/client/aimtoolbar?NCID=aolcmp00300000002586>for your browser. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > 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 > > -- VAMSI KRISHNA KARAMSETTY #113 Colling Hall Commerce - 75428 Tx, USA. Ph : 903 468 4437 |
From: Per W. <pw...@ia...> - 2008-03-10 17:10:21
|
You really do have to add more information. Especially since you want help with your school assignment. What have you tried? What did happen? What did you expect to happen? By the way - why not a plain text mail, instead of sending your text as both text and HTML? /pwm On Mon, 10 Mar 2008, KSB1265 wrote: > Hey all: > > I am writing a program using C++ that computes employee info. How do I calculate the oldest employee and the employee with the most tax? I am also having a problem calculating the taxes. I have been trying with this for a while now. Please help. Thanks. > |
From: KSB1265 <ks...@ao...> - 2008-03-10 16:50:56
|
Hey all: I am writing a program using C++ that computes employee info. How do I calculate the oldest employee and the employee with the most tax? I am also having a problem calculating the taxes. I have been trying with this for a while now. Please help. Thanks. |
From: João M. R. S. T. <ta...@fe...> - 2008-03-06 15:24:46
|
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co-workers and colleagues.) **************************************************************************** ******* Special issue on Image Processing Gest Editors: João Manuel R. S. Tavares & Renato M. Natal Jorge UP - Portugal International Journal of Tomography & Statistics ISSN 0973-7294 (Online) - 0972-9976 (Print) http://www.isder.ceser.res.in/ijts.html **************************************************************************** ******* Dear Colleague, This special issue of the International Journal of Tomography & Statistics (IJT&S) is devoted to promote a broad exchange of information on technologies, applications, operations and quality assurance in the areas of Computed Tomography, Statistics as well as of Image Processing. This special issue on Image Processing is an opportunity for users, scientists, image equipment suppliers and all who are interested to present their works on image detectors and acquisition systems, signal processing, image processing and analysis, medical imaging, pattern analysis and recognition, volume scanning and reconstruction, features extraction and classification, telemedicine, virtual and augmented reality, enhanced computation and software applications of image processing. Thus, if you are working on the related areas of the special issue Image Processing, It is an honour to invite you to submit your work to be published in the IJT&S. Important Dates and Instructions: Deadline for papers submission: 30/06/2008; Authors notification: 15/09/2008; Final version of accepted papers: 1/11/2008; If you intend to submit your work please notify as soon as possible the guest editors of your intention (ta...@fe..., rn...@fe...); Papers for the special issue should be sent to the guest editors (ta...@fe..., rn...@fe...); Instructions for authors are available at: http://www.isder.ceser.res.in/ijts/instr4a.html. With kind regards, Yours sincerely The Guest Editors João Manuel R. S. Tavares (ta...@fe...) Renato M. Natal Jorge (rn...@fe...) University of Porto, Portugal |
From: Michal M. <mi...@mo...> - 2008-03-03 21:43:58
|
frederico schardong napsal(a): > look this: > > main(){ > > int a; > > while (1){ > if (a=kbhit()) > printf("key press: %d",(char)a); > } > } > > > I need that: the program show me which keys are pressed in speed it reads.. > I was tried some alternatives and no work.. one is at the top of the page.. > What's happening is.. any key I press, printf go to the work and not > pause... if I don't press not, nothing works.. > > sugestions? the function you need to use is getch(), not kbhit() |
From: frederico s. <fre...@gm...> - 2008-03-03 19:21:34
|
look this: main(){ int a; while (1){ if (a=kbhit()) printf("key press: %d",(char)a); } } I need that: the program show me which keys are pressed in speed it reads.. I was tried some alternatives and no work.. one is at the top of the page.. What's happening is.. any key I press, printf go to the work and not pause... if I don't press not, nothing works.. sugestions? |
From: Wobien <roo...@pl...> - 2008-03-01 21:30:11
|
You can link them by using declarations. Example: main c-file: // declaration of myfunc: int myfunc ( int j); int main() { . . . int i,j; . . . i = myfunc(j); . . . } c-file that implements myfunc: int myfunc (int j) { //code that implements function . . . } ----- Original Message ----- From: rus...@ao... To: dev...@li... Sent: Saturday, March 01, 2008 4:37 AM Subject: [Dev-C++] linking help needed. Don't know how to do it, would like to link one c file to another c file. I've tried compiling the 2nd c file, but keep getting weird errors that mention missing variables (that are in the other file). Help. :) ------------------------------------------------------------------------------ Supercharge your AIM. Get the AIM toolbar for your browser. ------------------------------------------------------------------------------ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ ------------------------------------------------------------------------------ _______________________________________________ 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...> - 2008-03-01 19:04:43
|
Most programming info on the net actually holds quite good quality. The problem is that it is all spread out on a large number of pages. This question was an entry-level question, which suggests that the OP is in need of a decent book that has a lot of information collected at a single location. If you don't know about a concept, you don't know that you can search about it. With a book, you can read it from start to end, and pick up a huge number of nice concepts. After having read the book, it is a lot easier to start googling for more in-depth information. /pwm On Sat, 1 Mar 2008, Eric wrote: > I must say I was a little confused on this untill I saw Per Westermark > reply > > I put [bit operations C or C++ ] into google and got a fast reply, the next > question is "how much should we trust Internet?" I think that is why Per > Westermark recomends a good book. > > http://www.cprogramming.com/tutorial/bitwise_operators.html > > > > ----- Original Message ----- > From: frederico schardong > To: dev...@li... > Sent: Friday, February 29, 2008 11:45 AM > Subject: [Dev-C++] give bit in byte > > > Hi. > > I need to give one bit in byte, this bit is a 4° bit of byte.. > I need to give if it's low or up... > Does this without use others bits of byte.. > any sugestions? > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > _______________________________________________ > 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.516 / Virus Database: 269.21.2/1304 - Release Date: 2/29/08 > 8:18 AM > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > 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: Shawn <tre...@gm...> - 2008-03-01 04:35:48
|
Thanks for the help everyone...I really appreciate this list! Robert Alatalo wrote: > Hello, > > A couple of points... as was mentioned you need to figure out > what you want months to be. If you want it to be a simple array you > can do as was suggested: > > char* months[] = { "January", "February", ... }; > > or you could create a class called months which could be much more > complicated, which depends upon what you are planning on doing next, > so let me give you a couple of quick working solutions for you to play > with. Another thing to point out that it's rather bad form to use the > same variable name for two nested loops. It may actually work because > the inner loop variable will hide the outer loop variable which isn't > actually being used but hiding could make it more confusing if you > actually did want to use the year loop for something in the future. > > Also, the << is used repeatably, it's a standard operator , think of > it like += where you just keep taking on values at the end, > so > > cout<<"Please enter the # of years.">>endl; > should be > cout<<"Please enter the # of years."<<endl; > > Another thing to point out, "using namespace std;" will bring > everything from the std name space into the global name space and > should be avoided beyond simple test cases, it's find for this but I > am going to show you a more deliberate form: > > using std::cout > using std::endl > > since that's what you're using..that way you won't being in something > from std that you didn't intend. > > also, it's a small performance thing but a good habit to learn... use > ++Variable rather than Variable++ if you don't need the old value for > anything, otherwise the compiler does something like { int temp ; temp > = value ; value += 1 ; return temp } > > Also, arrays are Zero based in C/C++ so you need to go from 0 to 11 or > create months like {"Dummy","January"....} > > > I attached two samples of 'working' code, look if you want.... I know > it can be annoying sometimes to get the syntax correct even when you > know what you're doing, so hope they help. > > -Robert > > > > > On Fri, Feb 29, 2008 at 5:12 PM, Shawn <tre...@gm...> wrote: > >> It's just going to be a list of the months that the code in the for loop >> will iterate thru...string data. When they enter one for the outside loop >> of the year, it will goto the inside loop and each time the loop asks for >> the average rainfall, I want it to start for Jan, next prompt for Feb, taken >> directly for the array I'm trying to initialize. >> >> Thanks. >> >> >> >> Per Westermark wrote: >> You must have missed something in your C++ book. Class of what type? And >> if you try to get an array of January, February, ... - where is the >> definition for January? >> >> char* months[] = { "January", "February", ... }; >> >> In this case, months has a known data type - array of string pointers. >> In this case, the array elements are not undefined variables, but of >> directly specified string constants. >> >> /pwm >> >> On Fri, 29 Feb 2008, Shawn wrote: >> >> >> >> I've never tried using arrays before in C++, just am familiar with using >> them in python. I tried initializing the array as string months and >> then {"January","February", ect} but the complier told me I needed to >> set it up in constructor method. I looked that up in my book and came >> up with this, but now I get the error that January isn't declared. >> >> My intention is to have it automatically advance to the next month in >> the list by months[i] in the inner loop. Am I on the right track? >> >> Thanks! >> >> #include<iostream> >> #include<iomanip> >> using namespace std; >> >> >> >> int main() >> { >> >> int years = 0; >> int counter = 0; >> int month = 0; >> int average = 0; >> *class months = >> {January,February,March,April,May,June,July,August,September,October,November,December};* >> >> >> months++ >> cout<<"Please enter the # of years.">>endl; >> for(i=years; i<=years; i++1) >> >> { >> for(i=12; i<=12; i++1) >> {cout<<"Please enter the rainfall for"<<months[i]<<; >> cin>>month >> sum = sum + month >> counter = counter + 1 >> } >> >> average = sum / counter >> >> >> cout<<"The total number of months was "<<counter<<"."; >> cout<<"The total inches of rainfall was "<<sum<<"."; >> cout<<"The average rainfall was "<<average<<"."; >> >> >> >> return 0; >> } >> >> >> >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> 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: Robert A. <ral...@gm...> - 2008-03-01 04:31:33
|
Hello, A couple of points... as was mentioned you need to figure out what you want months to be. If you want it to be a simple array you can do as was suggested: char* months[] = { "January", "February", ... }; or you could create a class called months which could be much more complicated, which depends upon what you are planning on doing next, so let me give you a couple of quick working solutions for you to play with. Another thing to point out that it's rather bad form to use the same variable name for two nested loops. It may actually work because the inner loop variable will hide the outer loop variable which isn't actually being used but hiding could make it more confusing if you actually did want to use the year loop for something in the future. Also, the << is used repeatably, it's a standard operator , think of it like += where you just keep taking on values at the end, so cout<<"Please enter the # of years.">>endl; should be cout<<"Please enter the # of years."<<endl; Another thing to point out, "using namespace std;" will bring everything from the std name space into the global name space and should be avoided beyond simple test cases, it's find for this but I am going to show you a more deliberate form: using std::cout using std::endl since that's what you're using..that way you won't being in something from std that you didn't intend. also, it's a small performance thing but a good habit to learn... use ++Variable rather than Variable++ if you don't need the old value for anything, otherwise the compiler does something like { int temp ; temp = value ; value += 1 ; return temp } Also, arrays are Zero based in C/C++ so you need to go from 0 to 11 or create months like {"Dummy","January"....} I attached two samples of 'working' code, look if you want.... I know it can be annoying sometimes to get the syntax correct even when you know what you're doing, so hope they help. -Robert On Fri, Feb 29, 2008 at 5:12 PM, Shawn <tre...@gm...> wrote: > > It's just going to be a list of the months that the code in the for loop > will iterate thru...string data. When they enter one for the outside loop > of the year, it will goto the inside loop and each time the loop asks for > the average rainfall, I want it to start for Jan, next prompt for Feb, taken > directly for the array I'm trying to initialize. > > Thanks. > > > > Per Westermark wrote: > You must have missed something in your C++ book. Class of what type? And > if you try to get an array of January, February, ... - where is the > definition for January? > > char* months[] = { "January", "February", ... }; > > In this case, months has a known data type - array of string pointers. > In this case, the array elements are not undefined variables, but of > directly specified string constants. > > /pwm > > On Fri, 29 Feb 2008, Shawn wrote: > > > > I've never tried using arrays before in C++, just am familiar with using > them in python. I tried initializing the array as string months and > then {"January","February", ect} but the complier told me I needed to > set it up in constructor method. I looked that up in my book and came > up with this, but now I get the error that January isn't declared. > > My intention is to have it automatically advance to the next month in > the list by months[i] in the inner loop. Am I on the right track? > > Thanks! > > #include<iostream> > #include<iomanip> > using namespace std; > > > > int main() > { > > int years = 0; > int counter = 0; > int month = 0; > int average = 0; > *class months = > {January,February,March,April,May,June,July,August,September,October,November,December};* > > > months++ > cout<<"Please enter the # of years.">>endl; > for(i=years; i<=years; i++1) > > { > for(i=12; i<=12; i++1) > {cout<<"Please enter the rainfall for"<<months[i]<<; > cin>>month > sum = sum + month > counter = counter + 1 > } > > average = sum / counter > > > cout<<"The total number of months was "<<counter<<"."; > cout<<"The total inches of rainfall was "<<sum<<"."; > cout<<"The average rainfall was "<<average<<"."; > > > > return 0; > } > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > 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: <rus...@ao...> - 2008-03-01 03:38:12
|
Don't know how to do it, would like to link one c file to another c file. I've tried compiling the 2nd c file, but keep getting weird errors that mention missing variables (that are in the other file). Help. :) |
From: Shawn <tre...@gm...> - 2008-02-29 22:12:42
|
It's just going to be a list of the months that the code in the for loop will iterate thru...string data. When they enter one for the outside loop of the year, it will goto the inside loop and each time the loop asks for the average rainfall, I want it to start for Jan, next prompt for Feb, taken directly for the array I'm trying to initialize. Thanks. Per Westermark wrote: > You must have missed something in your C++ book. Class of what type? And > if you try to get an array of January, February, ... - where is the > definition for January? > > char* months[] = { "January", "February", ... }; > > In this case, months has a known data type - array of string pointers. > In this case, the array elements are not undefined variables, but of > directly specified string constants. > > /pwm > > On Fri, 29 Feb 2008, Shawn wrote: > > >> I've never tried using arrays before in C++, just am familiar with using >> them in python. I tried initializing the array as string months and >> then {"January","February", ect} but the complier told me I needed to >> set it up in constructor method. I looked that up in my book and came >> up with this, but now I get the error that January isn't declared. >> >> My intention is to have it automatically advance to the next month in >> the list by months[i] in the inner loop. Am I on the right track? >> >> Thanks! >> >> #include<iostream> >> #include<iomanip> >> using namespace std; >> >> >> >> int main() >> { >> >> int years = 0; >> int counter = 0; >> int month = 0; >> int average = 0; >> *class months = >> {January,February,March,April,May,June,July,August,September,October,November,December};* >> >> >> months++ >> cout<<"Please enter the # of years.">>endl; >> for(i=years; i<=years; i++1) >> >> { >> for(i=12; i<=12; i++1) >> {cout<<"Please enter the rainfall for"<<months[i]<<; >> cin>>month >> sum = sum + month >> counter = counter + 1 >> } >> >> average = sum / counter >> >> >> cout<<"The total number of months was "<<counter<<"."; >> cout<<"The total inches of rainfall was "<<sum<<"."; >> cout<<"The average rainfall was "<<average<<"."; >> >> >> >> return 0; >> } >> >> > > > |
From: Eric <eri...@wo...> - 2008-02-29 20:59:00
|
I must say I was a little confused on this untill I saw Per Westermark reply I put [bit operations C or C++ ] into google and got a fast reply, the next question is "how much should we trust Internet?" I think that is why Per Westermark recomends a good book. http://www.cprogramming.com/tutorial/bitwise_operators.html ----- Original Message ----- From: frederico schardong To: dev...@li... Sent: Friday, February 29, 2008 11:45 AM Subject: [Dev-C++] give bit in byte Hi. I need to give one bit in byte, this bit is a 4° bit of byte.. I need to give if it's low or up... Does this without use others bits of byte.. any sugestions? ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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.516 / Virus Database: 269.21.2/1304 - Release Date: 2/29/08 8:18 AM |
From: Per W. <pw...@ia...> - 2008-02-29 20:31:32
|
Yes. Look at bit operations, in any C or C++ programming language book. Trust me, it is worth the money to get a decent book. It constains answers to this and a lot of other questions you may have. Or cheaper solution: Google and C bitwise operations. /pwm On Fri, 29 Feb 2008, frederico schardong wrote: > Hi. > > I need to give one bit in byte, this bit is a 4° bit of byte.. > I need to give if it's low or up... > Does this without use others bits of byte.. > any sugestions? > |
From: frederico s. <fre...@gm...> - 2008-02-29 19:45:50
|
Hi. I need to give one bit in byte, this bit is a 4° bit of byte.. I need to give if it's low or up... Does this without use others bits of byte.. any sugestions? |
From: Per W. <pw...@ia...> - 2008-02-29 16:09:24
|
You must have missed something in your C++ book. Class of what type? And if you try to get an array of January, February, ... - where is the definition for January? char* months[] = { "January", "February", ... }; In this case, months has a known data type - array of string pointers. In this case, the array elements are not undefined variables, but of directly specified string constants. /pwm On Fri, 29 Feb 2008, Shawn wrote: > I've never tried using arrays before in C++, just am familiar with using > them in python. I tried initializing the array as string months and > then {"January","February", ect} but the complier told me I needed to > set it up in constructor method. I looked that up in my book and came > up with this, but now I get the error that January isn't declared. > > My intention is to have it automatically advance to the next month in > the list by months[i] in the inner loop. Am I on the right track? > > Thanks! > > #include<iostream> > #include<iomanip> > using namespace std; > > > > int main() > { > > int years = 0; > int counter = 0; > int month = 0; > int average = 0; > *class months = > {January,February,March,April,May,June,July,August,September,October,November,December};* > > > months++ > cout<<"Please enter the # of years.">>endl; > for(i=years; i<=years; i++1) > > { > for(i=12; i<=12; i++1) > {cout<<"Please enter the rainfall for"<<months[i]<<; > cin>>month > sum = sum + month > counter = counter + 1 > } > > average = sum / counter > > > cout<<"The total number of months was "<<counter<<"."; > cout<<"The total inches of rainfall was "<<sum<<"."; > cout<<"The average rainfall was "<<average<<"."; > > > > return 0; > } > |
From: Shawn <tre...@gm...> - 2008-02-29 15:46:07
|
I've never tried using arrays before in C++, just am familiar with using them in python. I tried initializing the array as string months and then {"January","February", ect} but the complier told me I needed to set it up in constructor method. I looked that up in my book and came up with this, but now I get the error that January isn't declared. My intention is to have it automatically advance to the next month in the list by months[i] in the inner loop. Am I on the right track? Thanks! #include<iostream> #include<iomanip> using namespace std; int main() { int years = 0; int counter = 0; int month = 0; int average = 0; *class months = {January,February,March,April,May,June,July,August,September,October,November,December};* months++ cout<<"Please enter the # of years.">>endl; for(i=years; i<=years; i++1) { for(i=12; i<=12; i++1) {cout<<"Please enter the rainfall for"<<months[i]<<; cin>>month sum = sum + month counter = counter + 1 } average = sum / counter cout<<"The total number of months was "<<counter<<"."; cout<<"The total inches of rainfall was "<<sum<<"."; cout<<"The average rainfall was "<<average<<"."; return 0; } |
From: hhh h. <the...@ho...> - 2008-02-27 10:44:35
|
Hello Jessica, I have used OpenFile(), and CreateFile() functions before, I could be of some assistance if you have any specific questions. GetOpenFileName() does not actually open a file, it rather creates a dialog box, like the "Save As" dialog we see in many commercial software... the actual File opening operation must be performed by OpenFile, or preferably by CreateFile(). http://msdn2.microsoft.com/en-us/library/aa363858(VS.85).aspx Check this page out. Date: Fri, 22 Feb 2008 15:34:43 -0500From: jes...@gm...To: dev...@li...Subject: [Dev-C++] about win32 api file openIs there anyone have the code sample of File Open?I was told I should use GetOpenFileName().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: Per W. <pw...@ia...> - 2008-02-26 11:50:58
|
After it has produced this error? Wouldn't it be a good idea to actually tell what error it has produced? And are you talking about a compilation error or a runtime error? Or do you expect every reader on this list to cut and paste your source code just to test and compile and optionally run it? /pwm On Tue, 26 Feb 2008, Igor Nunes da Cruz wrote: > Create a program that stores for each of 10 > Products the following data: name, code, value and > An array of demands from sales, Monday to Friday, > In the first two weeks of the month of July only. > The program will show, for each product, the day > Of the week on which it had higher mean > Sale and the value of this medium. > How to proceed after it has produced this error? > #include<stdio.h> > #include<conio.h> > #define size 2 > main() > { > struct reg{ > char nome_p[20]; > int cod,baixa[2][5]; > float preco; > }venda[size]; > int l,c; > float media_v=0; > for(l=0;l<size;l++){ > fflush(stdin); > printf("\nNome do produto %d: ",l+1); > gets(venda[l].nome_p); > printf("\nCodigo do produto %s: > ",venda[l].nome_p); > scanf("%d",&venda[l].cod); > while(venda[l].cod==venda[c].cod){ > c=0; > printf("Erro! Codigo existente! Digite outro > codigo: "); > scanf("%d",&venda[l].cod); > } > printf("Valor do produto %s: R$ > ",venda[l].nome_p); > scanf("%f",&venda[l].preco); > for(l=0;l<2;l++) > { > for(c=1;c<6;c++) > { > printf("[ - Mes de > Julho - ]"); > printf(" > ------------------ "); > printf(" Semana %d > ",l+1); > > scanf("%d",&venda[l].baixa[l][c]); > printf(" %d Semana > %d",c+1,venda[l].baixa[l][c]); > > scanf("%d",&venda[l].baixa[l][c]); > > printf("\nQuantidade de %s vendido na %d: ",venda[l].nome_p,c+1); > > scanf("%d",&venda[l].baixa[l][c]); > media_v = > media_v+venda[l].baixa[l][c]/size l; > } > printf("\n\n"); > } > } > printf("O produto vendido foi %s na semana %d - %d e sua media de > venda foi > %.2f",venda[l].nome_p,venda[l].baixa[l][c].sem,venda[l].baixa[l][c].dia,media_v); > getch(); > } > Thanks, > > -- > Igor da Cruz > |