What is the meaning of the & in the function?
Code:void affine(int a, int b, ifstream& input, ofstream& output)
THANKS
This is a discussion on What is the meaning of within the C++ Programming forums, part of the General Programming Boards category; What is the meaning of the & in the function? Code: void affine(int a, int b, ifstream& input, ofstream& output) ...
What is the meaning of the & in the function?
Code:void affine(int a, int b, ifstream& input, ofstream& output)
THANKS
It means that you are looking at C++ code instead of C code
And as C++, it means that the parameter is a reference parameter. For more information, you should read/work through an introductory book on C++.
*moved to C++ programming forum*
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
Is there an operator in C that does the same thing?
It is not an operator in the first place. It is syntax, similiar to say, the syntax used to declare pointers. Now, there is no equivalent in C, but using a pointer parameter would be a similiar option in C.Is there an operator in C that does the same thing?
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
Pointers may be used to achieve the same desired effect, but they are not the same.
Also, ifstream and ofstream are C++ classes for I/O.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
I decided to use FILE* to get the job done
What language are you actually intend to learn/use?
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^