Your "class.cpp" would normally be instead, "class.h" - a header file.
You also don't need a semi-colon at the end of the #include part.
Otherwise, it looks okay.
You also don't need a semi-colon at the end of the #include part.
#include "class.h"
Otherwise, it looks okay.