// Type the determine year in the command line as an argument. // This program then prints the months and days for that year. //Known Error argv[1] = the first digit of year,
I am currently learning C ++, and this is one of my assignments. I just spent the better half of the day looking at it to no avail.
printYear () has been tested over many years and is functional. The only residual error is argv []. It returns only the first digit of the entered year, which is great if you want to research years 0-9. Any tips or tricks that you guys miss me? (I am using Microsoft Visual Studio fyi)
Command line
calender.exe 1982
returns using
Number of Arguments Loaded : 1 Year : 1 Year is 1
Duplicate code that I know, but I have problems.
c ++ arguments
Code eyez
source share