#1. Don't use using namespace std;
While that would work in your particular case, it's considered bad practice. Especially when you move out your code to separate header files.
See more details here please:
Why is "using namespace std;" considered bad practice?
#2. Use separate translation units
I was also wondering if I should make a .cpp file for each of my class header files, or is it ok to just put my methods with the header files.
Yes you should do that, unless you have template class implementations.
When doing so, it's very important to have header guards like
#ifndef CHARACTER_H
#define CHARACTER_H
// Class declaration of Character goes here ...
#endif // CHARACTER_H
or
#pragma once
// Class declaration of Character goes here ...
to prevent multiple declaration compiler errors.
- 5.2k
- 4
- 23
- 32