#ifndef time
#define time
class time
{
int month;
};
#endif
and i and just trying to cin month and cout month in my main
#include <iostream>
#include "time.h"
using namespace std;
int main()
{
cin >> time.month;
cout << time.month << endl;
}
I keep getting this error "error C2228: left of '.month' must have class/struct/union"
what is wrong with this code?

New Topic/Question
Reply




MultiQuote







|