0

Compile error

There is C++ task with a string of code: "char *c= "Some string"; " but in Visual Studio such note will cause a compile error. Who can explain? Why so?

14th Apr 2018, 6:49 AM
Ivan Saveliev
Ivan Saveliev - avatar
2 Respuestas
+ 4
Can you provide us with the error message?
14th Apr 2018, 6:51 AM
Hatsy Rei
Hatsy Rei - avatar
0
value of type "const char *" cant be used for initialization entity of type "char" and initialization:impossible to convert "const char [12]" to "char*"
14th Apr 2018, 6:03 PM
Ivan Saveliev
Ivan Saveliev - avatar