Write this script in c++ language 27) (12 pts) Finish the program below by addin
ID: 3595651 • Letter: W
Question
Write this script in c++ language
Explanation / Answer
Here is the code for you:
#include <iostream>
using namespace std;
struct Date
{
string month;
int day;
int year;
};
//Place the function prototype below this line.
void initStruct(Date&);
int main()
{
Date turkey; //variable to hold the date of Thanksgiving
//Place the function call statement below this line.
initStruct(turkey);
//cout << turkey.month << endl;
return 0;
}
//Place the function definition below this line - write the definition.
//This function initializes a structure variable
//with the date November 24, 2016.
void initStruct(Date &thanksgiving)
{
thanksgiving.month = "November";
thanksgiving.day = 24;
thanksgiving.year = 2016;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.