Hey everyone! So I'm having difficulty turning the int into string and I was wondering if anyone could help me and just generally look over the program and see if I've done it correctly, Thank you in advance!
It's a little late for me, so this might sound a little confusing, but for the 2nd month and the 29th day, I believe the syntax is actually year%4 == 0, that looks to be the only problematic code, to turn your strings into code, you would need to write a switch statement for each variable, or use if/else, dependent on your coding style.
string returning function:
1 2 3 4 5 6
//Here we can see that I chose to use the same variable name, as the original month is in a different scope.
std::string monthRet(int month)
switch(month):
case 1:
return"January";
// Please note that one does not need to use a break statement ONLY in this situation, since we are returning a value
The code to print that statement:
std::cout << monthRet(month)
I'll try to check back tommorow to see if you have any questions.