it should look more like this:
Code:
/* DATE.H */
#include<iostream>
using std::cout;
using std::endl;
#ifndef _DATE_H
#define _DATE_H
class date
{
private:
int day;
int month;
int year;
public:
void set(int dayin,int monthin,int yearin);
void show();
};
#endif
void date::set(int dayin,int monthin,int yearin)
{
day=dayin;
month=monthin;
year=yearin;
}
void date::show()
{
cout<<day<<"-"<<month<<"-"<<year<<endl;
}
Code:
/* MAIN.CPP */
#include "class.h"
int main(int argc,char**argv)
{
date d1,d2,d3;
d1.set(56,56,1894);
d1.show();
...
return EXIT_SUCCESS;
}