Some questions about syntax
Hi,
I would like to know what the following mean and do:
1. A function parameter with an assignment in the function declaration:
Code:
int someFunction (const string someString, bool somebool = false);
What does that assignment (= false) mean and do?
2. I'm building a C++ Berkeley socket wrapper and to access the close(socketDescriptor) function I need "::" in the front. What does "::" mean and do?
Ie, I will have to do:
Code:
::close(socketDescriptor)
3.
Code:
someClass::someFunction(string &message, int var2) throw() : someString(message) {
someString.append("??");
}
What does ": someString(message)" mean and do? Does it mean that at the end of this function someString will be thrown?
Thanks,
N29