How can i seperate Headers, classes and main functions in C++?
<p>Please help me in separating the classes, headers and main() in the following program. I tried my best but there is problem.</p>

<pre><code>#include "stdafx.h"
#include&lt;iostream&gt;
#include&lt;string&gt;
using namespace std;

class player
{
public:
    string name;
    string type;
    void getdata()
    {
     cout&lt;&lt;"Enter the name of the Player : "&lt;&lt;endl;
     cin&gt;&gt;name;
     cout&lt;&lt;"Enter the Game he play : "&lt;&lt;endl;
     cin&gt;&gt;type;
    }  
    void display()
    {
     cout&lt;&lt;"The name of the Player is : "&lt;&lt;name&lt;&lt;endl;
     cout&lt;&lt;"The game he will play is : "&lt;&lt;type&lt;&lt;endl;
    }
};

int main()
{
    player sachin;
    sachin.getdata();
    sachin.display();
    system("pause");
    return(0);
}
</code></pre>
