Understanding c++ block of code
- by kotoko
I was given a c++ main and have to code it so it works.
I am having some trouble understanding the code as I am a bit new to cpp.
Here is the code
int main(int argc, char *argv[]) {
Class::setAtribute("string");
Class(Class::CONSTANT) << "starting up...";
}
Some questions:
How can the first line work with no variables? Is it static?
The second line is really strange for me, what I can make out is a Constructor that takes in a class constante and then prints it out somehow?
If someone could explain me this bit of code it would be great!
Thanks in advance.