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 =?
int a, b, c = 10, 15, 20;were legal, which it's not, I'm struggling to think of any way in which that syntax would be preferable or clearer than the perfectly legalint a = 10, b = 15, c = 20;.int a = 10, b = 15, c = 20;is perfectly legal, but i just asked because it's interesting way. i see that in some languages is possible, but i don't know is it possible in c++. Thanks on answer :)