5,676 Posted Topics
Re: [QUOTE=ChrisMackle;]anyone?[/QUOTE] Don't be so anxious. This is a Forum of volunteers, not a 24-7 teaching site. Your formatting looks very good. I'd add a few more comments explaining what's happening. And the comments you have IMO should be more like: [CODE]case 2: //subtraction[/CODE] Next, change the program to to print … | |
Re: [QUOTE=vadriaan;]"Real code" is easier if you use an IDE. The IDE give you hints and suggestions. Enjoy your studies.[/QUOTE] "[I]Real programmers[/I]" don't need an IDE. They actually know what they're doing. | |
Re: [b][boilerplate_help_info][/b][code] Posing requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: [b][boilerplate_help_info][/b][code] Posing requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: [QUOTE=cscgal;1685808]So sorry the site has been down for a few hours this early morning. It happened when it was time to switch the clocks back (the servers didn't like that) ...[/QUOTE] After 50 years you'd think someone would have figured out the DST switch by now! :icon_rolleyes: | |
Re: [QUOTE=Arun Vir Singh;]Hi, i want the difference of time between clicking two buttons in a label. i tried most of the things but not working for me. [/quote] So, without knowing what [I]most things[/I] are, all that's going to happen is you'll get the same stuff you already tried. [QUOTE=Arun … | |
Using onMouseOver in a link - I am able to display a file's contents in a frame. - I can display an image file in an IMG tag But I can't figure out how to combine the two. What I want to do is onMouseOver display the contents of a … | |
Re: [QUOTE=timetraveller92;]nono.. its not the scanf! its the getchar. just add a fflush(stdin) statement before getchar and it will work fine[/QUOTE] nono.. [ICODE]fflush(stdin)[/ICODE] is very wrong. [url=http://www.gidnetwork.com/b-57.html]See this[/url] And yes, it's the [ICODE]scanf()[/ICODE] causing the [ICODE]getchar()[/ICODE] to not work as expected. Otherwise, why would you want to flush the buffer? :icon_rolleyes: | |
Re: [b][boilerplate_help_info][/b][code] Posing requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: [QUOTE=Vastor;]I thought that only ++a would not work because it's equivalent as "a = a + 1" while a++ would equivalent "a + 1", or what I miss?[/QUOTE] You missed the fact that 1) [B]a+1[/B] simply means add 1 to [B]a[/B] and use the result 2) [B]a++[/B] means [B]a=a+1[/B] and … | |
Re: 1) Never call [iCODE]srand()[/iCODE] where you need a random number. Call it [I]once[/I] at the beginning of the program only. 2) use a [iCODE]while[/iCODE] loop instead of a recursive function. | |
Re: First and foremost, learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url]. It's terrible and unreadable. Second, asking for help using [I]lol[/I], [I]idk[/I], [I]XD[/I], and [I]x.x[/I] gives us no information other than you spend too much time talking to the computer and not with real people. These are unnecessary and annoying computer geek jargon. … | |
Re: [QUOTE=cwarn23;]So does this mean people don't like to read the manual anymore or is it that they don't like being told to read the manual. [/QUOTE] After decades in the computer industry, I can assure you -- people [I]never[/I] liked to read the manual. | |
Re: Instead of outputting a SPACE, add it to a string. Before outputting a *, output that string. Be sure to reset (clear) the string after output. | |
Re: Where else but Tennessee?!?! Sheesh! Well, maybe Texas, Oklahoma, Mississippi, Alabama, Minnesota, Wyoming, Montana, Alaska, etc, etc, etc... :icon_rolleyes: | |
Re: The problem is we have no idea 1) what the output is supposed to be 2) what output you actually got. | |
Re: You've got it backwards. First you design the game. All aspects of the game. Then you break the functions of the game into smaller and smaller sub-functions. When you get the game into the smallest pieces you then design the code using pseudo-code. Only then do you start programming in … | |
Re: You do NOT need [iCODE]fseek()[/iCODE]. At the beginning of the program, read the data into an array of your CURRENCY structure and you are done with the file. Then you can process all the data you want. | |
Re: [b][boilerplate_help_info][/b][code] Posing requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: [QUOTE=senergy;1685338]bump?[/QUOTE] Do not be rude and bump threads. If someone can help they will when they get to it. And this bump is exceptionally rude because you were asked questions and rather than answer them you just said [B]bump?[/B] I know I would refuse to help with that attitude. | |
Re: There's nothing magic about reading your magic numbers. 1) Open the file in binary. 2) Read as many bytes as you need for your test. 3) Test the bytes for the correct values. 4) done... | |
Re: Start by creating a menu and inputting some data. Next, add writing the data file. Then read the data file and input more data. Sit at your desk and continue designing the program piece by piece. When done with each piece, add it to the program. ![]() | |
Re: [QUOTE=FinaL111;]1. the last line is cut off[/QUOTE] What causes you to exit the loop? Have you already output all the data when it exits? [QUOTE=FinaL111;]2. not sure if i need to have < 20 or <= 20 for the limit.[/QUOTE] Then you'll have to make a decision... There's an easy … | |
Re: [iCODE]malloc()[/iCODE] is designed to be used with C [iCODE]new[/iCODE] is used with C++ Therefore, if you are writing C++, use [iCODE]new[/iCODE] | |
Re: The telltale sign of a student programmer is a statement like [CODE] if(id >= MINID && id <= MAXID && exam1 >= MINEXAM && exam1 <= MAXEXAM && exam2 >= MINEXAM && exam2 <= MAXEXAM && exam3 >= MINEXAM && exam3 <= MAXEXAM) return true; else return false; [/CODE] Which … | |
Re: What?? Even I didn't understand what you guys said! You are printing the address [I]of the pointer[/I] to the string. address 65521 contains the pointer to the string "one" address 65525 contains the pointer to the string "two" address 65529 contains the pointer to the string "three" Change the line … | |
Re: This question has been asked over 10 times (that's as high as I counted). Try using the forum SEARCH "VB send email" Or leave the search box blank and hit SEARCH to get into advanced search. | |
Re: Create a batch file that executes the program on each .txt file. | |
Re: Not necessarily easiest, but it would work just fine. | |
Re: I do believe you are wrong [url]http://www.cplusplus.com/reference/string/getline/[/url] | |
Re: [QUOTE=BubblesBrian;]If I have one key condition that is let's say a gamebreaker. Ie money = less than 0, does everything else then go in a big while loopn which may contain many more while loops and if else statements. [/QUOTE] Yes | |
Re: [QUOTE=karmstrong;]I am having a couple of problems. I think I got the formatting down for the most part. I am having issues in a few calculations and how to iterate through them. Basically I need to take the radius and calculate the circumference and the volume. Once I have the … | |
Re: Please explain how the LOG and PrintLOG functions are supposed to work. Then explain how the code you wrote for them work. | |
![]() | Re: Why are you reading the first letter of the metal in the while statement? Do you really want the strings to be luminum ast-iron ngot-iron alleable-iron ngot-steel opper ickel ? Compare the file handle in these two statements: [ICODE]while (fgetc(inFile) != EOF) != NULL)[/ICODE] [ICODE]fscanf(inputFile, "%s", &metalName);[/ICODE] I'll bet the … ![]() |
Re: He said define the data layout. Add methods to load and retrieve the data elements. Add methods to read and write the data elements. Try this: Make sure NAME is your first data element. Write the class Immediately write the string "<END OF CLASS>" Examine at the file in binary. … | |
Re: [QUOTE=cwarn23;]Well perhaps in the future magic will replace technology ;)[/QUOTE] You've got it backwards. The future technology is the current magic. Corollary to [B]Arthur C Clark[/B]'s law. | |
Re: You need more parentheses in your equation. is [B](b-a/a-c)[/B] supposed to be 1) [B](b-(a/a)-c)[/B] 2) [B]((b-a)/(a-c))[/B] 3) [B]((b-(a/a))-c)[/B] etc. What you have is #1... | |
Re: No, you're not having trouble. You're not even trying to check if a negative number has been entered. You need to make an attempt. Where is the most logical place to test for this negative number? | |
Re: I don't like the function at all. It would be better IMO to read the file a character at a time and watch for the \n rather than reading an entire buffer, finding the \n and seeking back to reset the file pointer. Much less work. | |
Re: Try writing this a piece at a time. 1) Create the pattern * ** *** 2) Put that in a loop to make * * ** * ** *** 3) Make the pattern & && &&& 4) Add a loop to make $ $$ $$ $$$ $$$ $$$ 5) Merge … | |
Re: Also, you should get rid of [CODE]void clrscr() { system("cls"); }[/CODE] because it's more annoying to the user than useful, and calling the system to execute an O/S command is expensive. And as for: [CODE]void pause() { system("echo.");system("echo.");system("pause"); }[/CODE] 3 calls to system? Just to do what [CODE]cout << "\n\n"; … | |
Re: [iCODE]extern[/iCODE]s are used to "pass" variables from one source [I]file[/I] to another. Not within a single source file. Remove the [iCODE]extern[/iCODE] to make the variable a global and it should work fine (with one more change I leave to you.) | |
Re: Why are you trying to do this using wide strings? Based on your first post it was an arbitrary decision. | |
Re: [QUOTE=jhudielpeco;1680884]Please repair my loop.[/QUOTE] No, you repair it? What seems to be wrong? It's upside down, right? So reverse the code properly inside the outer loop. | |
Re: So what is the program doing wrong? (details please) | |
Re: The biggest problem I have is just trying to read the code with the excessive and inconsistent indentation. 4 SPACEs rather than 2 TABs for each indent level is enough. As for C++, remove [iCODE]#include<iostream>[/iCODE] and if there are any new errors, that's C++ code. Change it accordingly. If you … | |
Re: [QUOTE=Clinton Portis;]I will gladly be more specific; allow me to take this opportunity to remind ye' that [B]YOU ARE POSTING C CODE IN A C++ FORUM.[/B] I don't go to a Java forum and post Pascal. I don't go to a C# forum and post QBasic. I don't go to … | |
Re: [QUOTE=mameemonster;]hello. i make a program for bus ticket reservation and i want to put a seat number in there. so if want to loop the program, and if i pick the same seat number, the program will tell me the seat is taken. is it possible to save information before … | |
Re: [QUOTE=yurigagarin;1677762]I have a bunch of floats and I need to convert them to string to use Send command to send to a Receiver. However, I been trying to code like below where long1deg is a float. [ICODE] char long1degC = long1deg; [/ICODE] Or [ICODE] char* long1degC = new char[30]; float … |
The End.