I can easily call the fstream class within main(). However, I cannot pass the instance of fstream into another class. Furthermore, I tried #include fstream in the class member function file. That does not work either. Is there a way to pass and/or use fstream in a class?
This is out of topic, but for example let say I declare a pointer as:
char *pointer;
pointer = new char[5]; // Notice this pointer is one dimensional
When passing it to a function, is it possible to also declare the function as a pointer to that pointer?
Ex:
void right(char **ptr)
{}
Will ptr point to pointer?
I do know that "char **ptr" will work if it is pointed to "*pointer[]." The problem is "*pointer" is one dimensional, not two.
Kuphryn
This is out of topic, but for example let say I declare a pointer as:
char *pointer;
pointer = new char[5]; // Notice this pointer is one dimensional
When passing it to a function, is it possible to also declare the function as a pointer to that pointer?
Ex:
void right(char **ptr)
{}
Will ptr point to pointer?
I do know that "char **ptr" will work if it is pointed to "*pointer[]." The problem is "*pointer" is one dimensional, not two.
Kuphryn