When you provide a shorthand that's all well and good but when you TEACH a short hand it's what's ONLY used by the students.
The students will assume there is no other way to read and write then using >> and << which is horribly incorrect. These are largely inadequate measures for reading and writing in my experience as you probably want to do formatting which printf just does better.
So many of the students in my CS class this semester can't do the first lab, which in all essence, is a tokenizer because they don't know that there are other ways for writing to, or reading from, a stream!
A short hand should only be used in a majority if it can do everything the long hand way can do.
Also for anyone interested what my first C++ project looked like you can see here:
https://web.njit.edu/~gwryan/CS280/CS280-Program-1-Fall-2016...
https://git.gravypod.com/gravypod/school/tree/master/cs280/h...
It's not my best work, but if any C++ people want to notify me of things I'm doing that's wrong I'm more then happy to learn.
Your project looks good. Two minor observations: 1.) You have 'using' statements in a header file. This is fine for a small project, but is considered bad form in larger projects (every file that includes that header will end up including the 'using' statements. This can cause collisions in large projects).
2.) Const correctness is a good habit to get into. (Ie, only pass non-const references if you are actually changing the object in the function)
Coming from Java I have a blanket policy that every variable is final unless needed to be modified. I've run into those pain points.
Your first observation is one I have some into as well but I haven't been taught how to do this.
For example if my header file needs to define the method:
void test(std::string something);
Is it bad form to them define the header in my cpp file as such? void test(string something);
Isn't that also bad form? Coming from C some things like this could be done but very much shouldn't have been done.I know for a fact that namespacing is one of the hugest benifits to large projects I just don't know how to use the tools provided by C++ to do it correctly. Java? Yea I can get anything you want nice and tucked away. But C++ with the way headers and namespacing works its difficult to obviously see what I want to do and how to get it done.
Any examples?
I'm not sure where that conversation would go. It prints to stdout. Would the student say the same thing about printf("%d", x)? How far down the rabbit hole did he want to go?
Stream insertion syntax os pretty bad, though, I'll agree with that. Especially when you want to print floating point.