-
Hard to explain -,-.
Ok, I havent written the code yet, but I'm wondering, is it possible to leave a default value for something?
IE:
Code:
void 2012(int n) {
#define int nDEFAULT 1
cout << n; //If you specify nothing for n, rather than 0, it should
//say "1".
}
Not real code, but do you get the point?
-
Sure, like this
Code:
#include <iostream>
using namespace std;
void foo ( int n = 1 );
int main ( ) {
foo ( ); // use default
foo ( 2 );
return 0;
}
void foo ( int n ) {
cout << n << endl;
}
-
*Kicks himself in the face". I need to get out of the habbit of thinking stupidly -,-.
Tyvm, you just saved my life XD.