|
-
Jun 23rd, 2000, 05:45 PM
#3
Monday Morning Lunatic
cout is a defined member of an 'ostream', which are type safe at compile time, and you can define your own actions. They're also simpler:
Code:
printf("%s = %d\n", mychar, mynumber);
cout << mychar << " = " << mynumber << endl;
if you have your own class, then you can make it define something so that you can put it into the stream, and it will display as you want it to.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|