+ 1

uninitialized member in code

https://www.sololearn.com/compiler-playground/cLafwX2CrOKy in this code i want to take input but no matter what i enter it says Access denied - You must be at least 18 years old. Age is: 0 ./Playground/file0.cpp: In function 'int main()': ./Playground/file0.cpp:7:9: warning: 'a' is used uninitialized in this function [-Wuninitialized] 7 | int age = a; | ^~~ age is 0 and this error message. why is this happening and how can i solve it

21st Dec 2022, 2:25 PM
Lalala
Lalala - avatar
2 Respostas