My background is in C# and C. I'm learning the syntax for C++. Wondering which code goes in the *.h files and which in the *.cpp files.
Initially I was placing variable declarations and method signatures in the *.h file, and method code in the *.cpp file.
Then I came across this case where moving method SetFunc to the *.cpp file didn't work. I had to put the SetFunc method code in the *.h file, and I was wondering why that was. When should I put the method definition in the *.cpp file and when in the *.h file?