![]() |
|
#1
|
|||
|
|||
C++ helpHey guys, can anyone look at my code. Im having some problems with it. 1. It will not output to a text file, 2. It will not perform the calculation, 3. The Letter Grade wont show. I tried everything I know, I'm knew at this. And can some explain what pass by reference mean. Thanks in advance.
OKEY, I got MY PROGRAM UPLOADED. |
|
#2
|
|||
|
|||
|
yes we can look at your code but where is your code? :-)
|
|
#3
|
||||
|
||||
|
Quote:
When you do post it, please use code tags! Instructions are on the site where new posters are supposed to find them. __________________
Age is unimportant -- except in cheese |
|
#4
|
|||
|
|||
|
Quote:
Im new to C++ so any help you can give me Id appreciate it. Thanx |
|
#5
|
||||
|
||||
|
Quote:
1) what the code is supposed to do 2) what it actually does 3) where you think the problem is You can also place comments on the lines of code you're having trouble with, making it easy on us to figure out the problem. __________________
Age is unimportant -- except in cheese |
|
#6
|
||||
|
||||
Pass by referenceQuote:
CPP / C++ / C Code:
When you use pass by reference, the actual address of the value in memory is given to the function, allowing the function to do whatever it wants to the original value. CPP / C++ / C Code:
The main places I've seen this is when you are using large values (structures, classes, arrays, etc.) that could be too large to effectively make a copy every time. If you're returning multiple values from the function, then you would also use PBR. CPP / C++ / C Code:
Hope that helps. __________________
Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#7
|
|||
|
|||
|
Quote:
Okey, basically this program is suppose to execute with functions to read student first nad last name 3 program score, 3 test scores, claculate the test average, program average course average, and gives it a letter grade. It's suppose to output to the monitor and to an output text file. But the problem is, I cant get it to output on a text file,and the calculation will not work. I'm gonnatry to uploade my program again. Thanks. okey, it wont let me upload using .cpp file. It onle accepts file bmp doc gif jpe jpeg jpg pdf png psd txt zip. CPP / C++ / C Code:
Last edited by dsmith : 26-Oct-2004 at 06:49.
Reason: Please use [c] & [/c] for syntax highlighting
|
|
#8
|
||||
|
||||
|
Next time you post code directly in the forum, I'd recommend using the codes to format it properly. Take a look at the "sticky" discussing code posting if you need help. It makes it easier to follow, and you won't get a bunch of smiley faces in the code. :-)
__________________
Common Sense v2.0-Striving to make the world a little bit smarter. |
Recent GIDBlog
Developing GUIs with wxPython (Part 2) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The