average sum = (average 1 + average 2)/2
average sum = (average 1 + average 2)/2
Nope. Even if average was typedef'd, 1 and 2 aren't legal identifiers and you can't just sum these newly declared variables. Also the statement is missing a semicolon at the end.
If you're just simply talking in generics, than that's sample code for about any program language you can think of.
Last edited by SlyMaelstrom; 03-03-2006 at 02:05 PM.
Sent from my iPadŽ
oh...so its not goin' to work..what can i do to make it a code....
You can start by actually learning C++ from a book rather than just kinda guessing...
Sent from my iPadŽ
exam average = ( exam_1 + exam_2)/2;
Sure, that could *possibly* be legal C++. But do you know how to make it legal? I would guess no.
Sent from my iPadŽ
no....not reallie...i have a book ..but it doesn't exam much
fahrenheit - 9/5 centgrade +32 ....is dat correct code
Please stop guessing and get a real book.
Sent from my iPadŽ
thanks for ur help man....
Don't give that sarcasm. There are some really helpful and smart people on this board...you just asked a bad question
http://www.catb.org/~esr/faqs/smart-questions.html
Yeah, seriously... not everyone is like me.Originally Posted by MadCow257
Sent from my iPadŽ
one more thing..
whats ++3.14?
u add 3. 14 twice
No, you can't increment a constant.
would add 1 to whatever var1's value was.Code:++var1;
Sent from my iPadŽ
the ++ is only used with variables. and it increments their values by one.
++ is really += 1