|
From: Jason S. <mys...@op...> - 2001-11-20 20:58:04
|
Not exactly where it comes from (conio.h tho, no? I know printf is C, so cprintf is probably just a nice little cousin of it) but do know if you used it on the ap exam it would be pretty icky. :)
Printf is a little bit more flexible from what I've seen, though. For instance,
cout<<"I will love you for "<<years<<" years and forever after that!";
can be replaced with
printf("I will love you for %d years and forever after that!",years);
I really don't know more than that, but I'm sure it can probably do other neat things as well. Whether or not it's better or worse than cout, faster or slower, yadda or not...dunno. ;)
Jason
----- Original Message -----
From: mi...@ju...
To: dev...@li...
Sent: Tuesday, November 20, 2001 3:36 PM
Subject: [Dev-C++] cout vs cprintf
What's the dif? I'm making a program in AP Computer Science and for some reason we used cprintf in it. My "fantatstic" teacher never explained why. What gives? Is it a holdover from C?
|