Hello, I already have a good experience with Java and recently I decided to learn C++. I wanna start with OOP in C++ so I'm doing the same thing I did with Java (same examples I did when I was learning it).
My favorite one was a bank that has accounts (and these accounts have money, an owner and a number). I'm working on it right now.
As far as I know I'm supposed to declare class variables and methods in a .h file and their implementation in a .cpp file.
When you define getAccountNumber you have to tell the compiler that it's a member of Account otherwise the compiler will treat it as some other, free function.