+ 1

Why can we not assign values to variables inside the class of C++?

class A { Int b=5; };

8th Apr 2019, 1:11 PM
Amar Singh
Amar Singh - avatar
2 Answers
+ 3
We can. Have you written int wrong in your code?
8th Apr 2019, 1:37 PM
HonFu
HonFu - avatar
0
No, i write correct declaration in code editor.
9th Apr 2019, 4:56 AM
Amar Singh
Amar Singh - avatar