I know that declaring variables like this int a = 10, b = 15, c = 20 is possible and it's ok, but is it possible in any program in c++ programming language, to declare variables like this int a, b, c = 10, 15, 20 where a need to be 10, b need to be 15 and c to be 20.
Is this possible and is it right way to declare variables like this in c++?
EDIT: Is it possible with the overloading operator =?
The compiler will issue an error for such declarations
The only idea that comes to my head is the following :)
Or you could make these names data members of a structure
There is not used the copy asssignment operator. It is a declaration. The copy assignment operator is used with objects that are already defined.:)