- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 14
- Posts with Upvotes
- 14
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: [QUOTE=Mr Gates]Ebil cscgal :twisted: Anyway, how would I do that so it deleted the file at closing?[/QUOTE] you can register a function that will be called when the program terminates with the atexit() function. this func could tehn call remove() on the file. | |
Re: write some code, and then ask us for help when u get stuck. read the sticky about homework. | |
Re: [url]http://www.linuxgazette.com/node/view/1644[/url] check that out. | |
Re: the definitive book to pick up would be charles petzolds "programming windows" | |
Re: it is faster to type but there's no difference in the code generated, test it and see for yourself. | |
Re: u are almost there. the scanf function returns teh number of correctly read variables. in your while loop, u are testing: [color=#000000][color=#007700] while (([/color][color=#0000bb]amt [/color][color=#007700]<= (float) [/color][color=#0000bb]100[/color][color=#007700]) && ([/color][color=#0000bb]correctItemsRead [/color][color=#007700]== [/color][color=#0000bb]1[/color][color=#007700])); but actually it should be: [/color][/color][color=#000000][color=#007700] while (([/color][color=#0000bb]amt [/color][color=#007700]<= (float) [/color][color=#0000bb]100[/color][color=#007700]) && ([/color][color=#0000bb]correctItemsRead [/color][color=#007700]!= [/color][color=#0000bb]1[/color][color=#007700])); when it returns 1, … | |
Re: agreed, it is always a good habit to get into. the only time u will see good programmers avoiding the practice is when writing kernel code - when every instruction counts, and then it is ur responsibility to be absolutely positive to double check that every variable is not used … | |
Re: forgot to check malloc() for error return, looks cool other than that :-D | |
Re: i'm not sure if this is the answer u want, b/c i dont fully understand what u mean by "log window", but if u run a program from DOS prompt like: ./program >outfile standard output is redirected to the file outfile. if u want to do that inside the program, … | |
Re: you need to learn a lot more to use graphics. most windows apps use the win32 API to display windows/pics/etc.. here is a tutorial bout it tho: [url]http://www.relisoft.com/win32/winnie.html[/url] | |
Re: in 99.99% of cases it is much better to learn to write code that your compiler can optimize well. ie, compiling and observering generated code, and trying to fix your C to generate the proper asm. asm resources: [url]http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html[/url] [url]http://www.geocities.com/SiliconValley/Lab/1563/assembly.html[/url] in short, on IA-32, registers eax, ecx, edx are called … | |
Re: read in the number of hours from the user using cin. if the number is <= 3, then charge is 2 else if the (number of hours - 3) * .50 + 2 > 10, it is $10 else the answer is (number of hours - 3) * .50 + … | |
Re: [url]http://www.devenezia.com/downloads/round-robin/index.html[/url] google. | |
Re: your add_item method should traverse to the END of the list, and add the element there. the remove_item method should remove the first element in the list. | |
Re: [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__popen.2c_._wpopen.asp[/url] need to use _popen() to send commands down a pipe to format, ur method will not work. | |
Re: read in the toll file, read in the customer file. store the customer's data into a structure. if the customers balance is > 0 then print out the data. what is it that u dont know how to do? we dont do homework here. write some code, when u get … | |
Re: if u check on java.sun.com they have a tutorial for nearly everything could imagine. | |
Re: c++ is a subset of c, or maybe it's the otehr way round i 4got that crap, but anyhow, piont is, u can't. | |
Re: a test plan is designed to test the robustness of your program. if you are taking in any input from the user, you would want to try many values for those inputs. most importantly, u would want to try values that a "nice" user wouldn't give u. for example, would … | |
Re: yea, that's what apache does. what exactly are u trying to do here? | |
Re: if it returns void, then you can't use the return value b/c there isn't one! you are trying to "cout << Calc()" , that means print out the return value of function Calc(), but it has no return value since the return type is void. | |
Re: you're better off using the STL if you can, their algorithms are far superior to what most of us could write. | |
Re: u need extra parentheses around the = assignment [code] return ( (remainder = ( num1 > num2 ? num1 % num2 : num2 % num1) )==0 ? num1 : gcd2(remainder, num1)); [/code] | |
Re: most p2p networks are just a bunch of people sitting at their home PC's all running some software program that creates a "network" between them. usually when a user starts this program they will connect to some central server that sends them a list ofa ll the other users logged … | |
Re: the compiler is telling u waht is wrong. the manual page apparently has an incorrect prototype, b/c gcc is telling u that it is returning an integer. try loooking at the header file and seeing if it has any notes on the function, or u can always try casting the … | |
Re: post your code enclosed in the [ code ] [ /code ] tags so it is formatted: [code] see the spaces get preserved [/code] and post the section of code u need help on, not 19 pages of it. | |
|