What are the ramifications of assigning a class variable when defining the class versus in the class constructor? Is the variable assigned in the class definition accessible by all class instances?
Example of assignment at instantiation:
class Foo
{
private:
int x;
double y;
public:
Foo()
{
x = 0;
y = 1.;
}
};
Example of assignment in class definition:
class Foo
{
private:
int x = 0;
double y = 1.;
public:
Foo();
};
edit: As to the class member being accessible by all instances, I think I was looking for the notion of a static declaration, I guess I'm just new to the curly brace languages.