C++ syntax
Page last updated 12 Feb 2011, by .
0
replies
//Call overloaded constructor...
FileExtractor::MyFileExtractor(string fname)
{
MyFileExtractor::MyFileExtractor(fname, STD_NUMBER_OF_COLMS);
}
//Declare reference parameters with a &
//To indicate a reference parameter, an ampersand (&) is written in the //function prototype and header after the parameter type name. For //example,
void assign(int& to, int from) {
to = from; // Will change the actual parameter in the call.
}
#include <iostream>
using namespace std;
int main() {
int array[10] = {0};
cout << "Array size is " << sizeof array / sizeof *array << ". "
<< endl;
}
Please log in to post comments.
