# include <iostream>
usingnamespace std;
//should this have the names e.g., (ifstream& inf, int size, int height)?
//I was taught that the declaration should ONLY have the types (int, char, etc)
void myFunction(ifstream&, int, int); //declare function
int main {
//call function
myFunction(inf, size, height);
other code
return 0;
//*************************myFunction******************************************
// Name: myFunction
// Description: does something great
//QUESTION: DO I NEED TO RENAME THE VARIABLES THAT ARE BEING PASSED HERE AS //SHOWN BELOW?
// Parameters: ifstream& inf, space catches size, tall catches height
// Return: none
//******************************************************************************
void myFunction(ifstream& inf, int space, int tall) {
function code here
}
You can put the names or not, it doesn't matter.
Personally I put the names there as it makes it easier to determine at a glance what the function does (and also because VC++ intellisense only looks at that for showing the function info).
I don't know what you mean by "rename" the variables. The parameter names are exclusive to that function; you can have variables in main called the same if you feel like it.