|
-
October 18th, 2010, 12:27 PM
#14
Re: Printing patterns
 Originally Posted by ttrz
Code:
printf("%c %c\n", '*', '*');
While this will work, substituting literals is really not necessary here:
will do the same thing.
 Originally Posted by adam86107
The instructor referred to it as a C++ class anyway.
Well, to be blunt, there are a lot of instructors who claim to be teaching C++, who are actually teaching "C with a few bits of C++ syntax thrown in". That isn't the way professional programmers write C++, but it is unfortunately very common in schools. The reason for this is that C makes it easier to teach the underlying data structures and algorithms than proper C++, because proper C++ does a lot of the low-level stuff for you. It's important to learn those low-level ideas, but you should also become familiar with the "right" way of doing things, because it's both easier and safer.
Last edited by Lindley; October 18th, 2010 at 12:29 PM.
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
|