View Single Post
Old 02-05-2007, 03:45 PM   #6 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,720
redhead is on a distinguished road
If you compare that example to what I'm showing you, you almost have the same level..
They use using std::cout etc. to tell when ever you use cout it's the one from the std::i/o class.. I use using namespace std to tell it, when ever something like cout/cin/fixed/showpoint dosn't fit anything it is assumed to come from the std::i/o class.

When they declare variables, they assign a value to them, like I do to mine..
They ask the user a few questions, and reads the response like I do.. They use the ignore() function, to make sure teh user dosn't type in a lot of garbage to find a loop hole in the code, I'm pretty ignorant to that, since this is a beginners class..

They display the results to the user, this part I'm hoping you are capable of compleeting yourself..

All in all, what I can see as a difference, is that you havn't learned loops yet, and I'm usign the while() loop to detect any unwanted input, but apart from that, the level seems about right.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote