While this will work, substituting literals is really not necessary here:
will do the same thing.Code:printf("* *\n");
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.

