Hey guys, I'm trying to understand a part of my professor's code. He gave an example for a hw assignment but I'm not sure how to understand this part of the code..
Here is the code:
1st question: Is "TaskOrAssignment tasks[]" considered the array name? Meaning is the "TaskOrAssingment" portion being renamed into "tasks[]?" I'm only asking because of the space between "TaskOrAssignment" and "tasks."
2nd question: Is "tasks[taskCount].course = course;" accessing or declaring a location for char course?
I hope I could get this answered and I'm pretty new to this site too.
Thank you.
*** Edit ***
Please use code tags when posting code.
Here is the code:
void addTask(TaskOrAssignment tasks[], int& taskCount, char *course, char *description, char *dueDate) { tasks[taskCount].course = course; tasks[taskCount].description = description; tasks[taskCount].dueDate = dueDate; taskCount++; }
1st question: Is "TaskOrAssignment tasks[]" considered the array name? Meaning is the "TaskOrAssingment" portion being renamed into "tasks[]?" I'm only asking because of the space between "TaskOrAssignment" and "tasks."
2nd question: Is "tasks[taskCount].course = course;" accessing or declaring a location for char course?
I hope I could get this answered and I'm pretty new to this site too.
Thank you.
*** Edit ***
Please use code tags when posting code.
