A
AMT2K5
"FILE* setFp(char []) - setFp is passed a null terminated character
array that contains the name of a file. Before attempting to open the
file check the state of fp. If fp is not null close fp. Open the file
in read mode using fp. Return fp."
In my assignment it wants the setFP function to take in a nameless
parameter? I am used to seeing something like "char a[]", not just an
empty variable name. How do I act on the incoming string if it has no
name?
class Bank
{
FILE* fp;
}
FILE* Bank::setFP(char [])
{
//some code goes here
}
array that contains the name of a file. Before attempting to open the
file check the state of fp. If fp is not null close fp. Open the file
in read mode using fp. Return fp."
In my assignment it wants the setFP function to take in a nameless
parameter? I am used to seeing something like "char a[]", not just an
empty variable name. How do I act on the incoming string if it has no
name?
class Bank
{
FILE* fp;
}
FILE* Bank::setFP(char [])
{
//some code goes here
}