Oh edit, I actually solved it by putting & on the ints in the void function as well as adding the date(), ty.
Code:
#include <iostream>
#include <iomanip>
using namespace std;
void date (int& month, int& day, int& year, int& fulldate)
{
year = (fulldate/10000);
day = (fulldate0);
month = ((fulldate/100)0);
return;
}
int main()
{
rerun:
int month, day, year, fulldate;
char a;
cout << "Enter a long integer of the form yyyymmdd: "<< endl;
cin >> fulldate;
date (month, day, year, fulldate);
cout << "The date is " << month << "/" << day << "/" << year <<endl;
cout << "Would you like to try again? [y/n]" << endl;
cin >> a;
if (a == 'y' || a == 'Y')
goto rerun;
else
return 0;
}