Here is my main()
Now what is in buffer is 2002 3 20 a dateCode:void main() { ifstream inFile; char buffer[80]; int year, month, day; inFile.open("birthday.txt",ios::in|ios::nocreate); if(inFile.fail()) { cout << "birthday.txt could not be opened"; exit(1); } inFile.getline(buffer,80,'\n'); }
I want to put 2002 into year an integer variable and month and day as well.
Thanks DarthC