Amateur c++ student here who has gotten to the point where I'm comfortable with classes somewhat, however I'm a bit obsessive compulsive. I've been learning by just continually adding to a program, however it's all in my main.cpp. I use visual studio 2005, and would like to take certain classes and move them over to their own file to keep my program direction organized, so when I create a class for this in VS it creates a .cpp and a .h . A bit lost of what to put in each. Should my class functions exist in the cpp, and then what goes in the h? declarations?
the . h starts with
#pragma once
class newClass
{
public:
newClass(void);
public:
~newClass(void);
};
and the .cpp goes
#include "newClass.h"
newClass::newClass(void)
{
}
newClass::~newClass(void)
{
}