Possible Duplicate:
Regarding C++ Include another class
i am new and would like to learn more about how do i split my C++ file into .h and .cpp
this is my File2.cpp
#include <iostream>
#include <string>
using namespace std;
class ClassTwo
{
private:
string myType;
public:
void setType(string);
string getType();
};
void ClassTwo::setType(string sType)
{
myType = sType;
}
void ClassTwo::getType(float fVal)
{
return myType;
}
I want split it into 2 files, which is .h and .cpp how do i split this as its a class, with private & public.
And I would like to use ClassTwo in File1.cpp(another cpp file)
How do i link it so i can use it at ClassTwo
Thanks for help.