I have an assignment to write a program that will calculate the number of days between two dates (including leap years). We have to read the data from a file and in my current input file I have:
for testing purposes. When I run the program the console runs continuously spouting out "The days between your two dates are 1097." Which would be the correct output for the last set of dates entered, but I need to find out where I've messed up in my main.
you need a month_1==-1 in order for the program to halt. Since the last line is not -1 in your file it just keeps spitting out the last result. You need an input file that looks something like this:
The date that seems to be giving me the problems is:
7 7 1982 9 4 1983
When I enter 9 4 1984 instead of 9 4 1983 it proceeds to work again.
The console will read out That's not a valid month over and over.
I'm getting these error messages with Microsoft Visual 2010:
'Project 3.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'Project 3.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'Project 3.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'Project 3.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'Project 3.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
Run-Time Check Failure #3 - The variable 'i' is being used without being initialized.
The thread 'Win32 Thread' (0x1b08) has exited with code -1073741749 (0xc000004b).
The program '[5264] Project 3.exe: Native' has exited with code -1073741510 (0xc000013a).