#ifndef _MYCLASS_H_
#define _MYCLASS_H_
class MyClass
{
public:
MyClass();
void read();
void write();
private:
std::string fileName; //idk what you want in here
};
#endif
myClass.cpp
1 2 3 4 5 6 7 8 9 10 11
#include "myClass.h"
//You do the hard work
void MyClass::read()
{
}
void MyClass::write()
{
}
main.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13
#include "myClass.h"
int main( int argc, char** argv )
{
MyClass myClass;
//Show your menu
//Ask for input
//if input = 1
myClass.read();
//if input = 2
myClaass.write();
return 0;
}