C++ syntax

cplusplus

//Call overloaded constructor...
FileExtractor::MyFileExtractor(string fname)
{
   MyFileExtractor::MyFileExtractor(fname, STD_NUMBER_OF_COLMS);
}

fredosaurus

//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.
}

daniweb

#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.