15,300 Posted Topics
![]() | Re: looked like most of those resulted in serious injuries or even death. But I like the alligator trick because anyone stupid enough to stick his head in an alligator's mouth diserves to get bit. And the guy who thought he was superman and attempted to jump from one rooftop to … |
Re: First, you have to extract the individual digits from the original value of [b]b[/b] so that they can be added together. Do that in a loop using the mod operator [b]%[/b] to extract the right-most digit then divide by 10 to shift all digits right [code] int x = 0; … | |
Re: you can use [URL="http://www.cplusplus.com/reference/clibrary/cmath/modf.html"]modf[/URL] to split a double into its two parts | |
Re: >>so I've assumed it's all C's fault. Never make that assumption because you will ALWAYS be wrong. >>path->points[length] = (struct pf_point32*)pf_allocate(sizeof(struct pf_point32)); function pf_plot32() That is trashing memory because [b]points[/b] is a pointer array of unspecified length I am supprised that you have coded all that but have never been … | |
Re: I have seen that behavior with VC++ 6.0 on XP os with Norton Antivirus running. Antivirus program prevented the IDE from saving the file successfully. | |
Re: [QUOTE=agrawalashishku;451499]I will read the sectors using INT13 BIOS and the disk already has a FAT file system.[/QUOTE] that won't work for huge hard drive partitions -- those larger than about 2 gig. | |
Re: The formatting is simply awful! If you reformat in more readible style and repost people may help you faster. Also do not use color tags -- use code tags and DaniWeb will add correct colors. | |
Re: can't help you without the code because I can't see your monitor from my chair. | |
Re: >>Ideas?? Yes. You have to create a project first. File --> New --> Project Tab --> Win32 Console Application (if that is the kind of application you want) >>Does anybody know where i get the programm borland c++ Probably from [url]www.borland.com[/url] | |
Re: I wish I had a virtual hand that would reach out and just slap the hell out of anyone who makes a post like this :) | |
Re: Unless you know who took it or know someone else who saw the thief then there is probably very little you can do about it other than turn it in to police. Chances are you will never see that laptop again. >>can there be any way to trace it if … | |
Re: use the [b]stat()[/b] or [b]fstat()[/b] standard C library functions. | |
Re: rename the parameter to something else other than [b]Average[/b]. There is no point to that parameter anyway, just make it a local variable and get rid of that parameter. | |
Re: why not use std::string and you won't have to worry about the size because std::string will do that for you. Just call [b]getline()[/b] to read the entire line. | |
Re: Since this is a C question and not C++ I'm moving it over to the C board. | |
Re: >>I'm not sure if this is the place... you should have used the [b]Flat Bad Post[/b] link that is on the same line as the post's time. That will get the attention of appropriate mods a lot faster than posting iit here. | |
Re: you mean you want to concantinate all those words into one big comma-separated string? Not too difficult to do if you use std::string c++ class [code] std::string the line; while read a word is successful line += string; line += ", "; end of while loop [/code] now the line … | |
Re: you have defined two variables with the same name -- [b]seats[/b], one is a parameter and the other a local variable. My guess is that you ignored your compiler's warning about that. NEVER ignore warnings because most of them are errors. | |
Re: I rarely turn my computer off at home, but I normally do turn my monitor off when I'm not using it. Not because I want to save [b]planet earth[/b] but just being mindful of my electric bill, although I doubt it really makes much difference. | |
Re: why can't you start the program ? what errors do you get? were there any errors or warnings when you compiled it ? did you fix ALL warnings ? | |
Re: you have to initialize [b]year[/b] to EOF before line 12 then add an if statement after eof to see if it still the same. The problem with this is that [b]year[/b] will not be changed if you type anything other than numeric digits. [code] do{ cout << "Enter a year: … | |
Re: you don't need the recursion. First compute the normal pay. Then if over 40 hours compute overtime pay. Here OVERTIME_SCALE would have to be redefined as 0.5 [code] double ComputeHourlyPay(double hoursWorked, double hourlyRate) { double regularPay = 0; double overtimePay = 0; double totalPay; cout << fixed << setprecision(2); regularPay … | |
Re: ask whoever wrote your library how to use the functions, or look around for the documentation (hopefully it exists). | |
Re: Yes that is indeed a huge pain in the ass! And no I don't know if there is anything we can do to prevent it other than being very very careful what we do. | |
Re: you can not use signal.h and msg.h at all -- not supported by any MS-Windows compiler I know of. Then remove the [b]sys/[/b] from the others. [b]occi.h[/b] have no clue. What you have left is this: [code] <time.h> <stat.h> [/code] | |
Re: You've tried to fix what ??? There are only two choices -- heads or tales -- 0 or 1. what else do you want? [edit] Ohhhh, I think I see the problem. after getting user input you immediately change it to either 0 or 1. Delete that line. [/edit] ![]() | |
Re: maybe the prosecuter is taking it to court as a test case to see if the law can be declared unconstitutional. | |
Re: use the standard [b]tolower()[/b] function (sometimes its a macro) to convert a character to lower case and it will work on every compiler's implementation [code] b = tolower(b); [/code] | |
Re: Depends on the operating system. MS-Windows/MS-DOS (and probably *nix) if you don't specify otherwise the file will go in the current working directory where the program was started. If you use MS-Windows use Windows Explorer to search your program's source code directory and you will probably find it there. Or … | |
Re: The code in lines 16-20 is all wrong. you need nested loops to do that, and array indices are the values of the loop counters, like this: [code] array[row][col] = 0; [/code] Or even easier -- you don't have to do the above at all if you initialize the array … | |
Re: I'm not a MAC user but it sounds like the data file is not in the same directory as where your program is running. Try putting the full path in the open statement, like this: Note: I don't know a thing about MAC file system so I'll use MS-Windows and … | |
Re: you don't need turbo debuger to view the disassembled program. Every version of MS-Windows since MS-DOS Version 1.0 comes with a free disassembler named [b]debug.exe[/b] (located in c:\windows directory). At a command prompt cd to the directory that contains the *.exe program then type this: [code] c:> debug someprogram.exe <Enter> … | |
Re: What operating system are you using? I might be wrong but I don't think TSRs work with MS-Windows command prompts because they only emulate MS-DOS. >>Please sir i can't do Narue is a woman. And just because you can not do something today doesn't mean you have to give up … | |
Re: just output the character as an integer, you might have to typecast it depending on what functions you use to display it. | |
Re: >>Can anyone point me in the right direction? Yes, take programming classes at your local college. I know that isn't what you wanted to hear, but that really is the best and quickest way to learn the language(s). And get a bachelor's degree if you want to make programming your … | |
Re: Set an event handler for WM_CLOSE event, then you can do whatever you want in that function. | |
Re: I think you can also [URL="http://www.qmedia.ca/launch/psdk.htm"]order the SDK on CD[/URL] at nominal cost, probably $5 to $10. | |
Re: >>Look at my code below and tell me what i'm doing wrong. the code you posted contains some syntax errors and missing semicolons. | |
Re: >>but it doesn't want to work by that I guess you mean it will not compile. What are the compile errors? What lines won't compile? I know for a fact that lines 38 and 40 are wrong. -- using << instead of >> also [b]purchase[/b] and [b]payment[/b] variables should probably … | |
Re: >>mathid[10] the array starts with size[5].when an array wants more memory it must renew it self and ask more space. You can't dynamically expand the array size when it is statically allocated like you posted in the class. You will have to make [b]mathid[/b] a pointer if you want to … | |
Re: [QUOTE=bdm10321;448894]is that correct?????[/QUOTE] No -- Narue lied to you. :) | |
[URL="http://www.bluemountain.com/view.pd?i=149486103&m=5946&rr=y&source=bma999"]The flasher[/URL] | |
Re: >> I'm receiving 4 errors please post them. my guess about the errors: The parameters on line 45 must match exactly line 6. Same with line 5 and 40. | |
Re: They all are coded the same way, pick one and you have all the others, just change the operator [code] int operator=(<parameter list here>) { // blabla } [/code] | |
Re: This will disable the button [inlinecode]CButton->EnableWindow(FALSE)[/inlinecode]. | |
Re: The first one is an empty string, the second one is a single character 0 identical to the third one. | |
Re: This requires just simple division (2nd grade or so math ) Number of busses = number of people / 50 out of the remainder from the above, the number of vans = number of people / 15 What's left is the number of cars needed. | |
Re: Ok -- now lets see YOUR code to implement all that. |
The End.