Im learning c++ and i work with chat gpt, i have error on my code correct me please.

Hi there,

I create “moving cube” prompt in chat gpt for learning code by modifi it. Apparently the code is right but i have some issues.



Well, I see two things. In your .cpp file I guess the line 6 is supposed to be a comment, just add an extra slash.

Also, both your .h and .cpp files are called “MyActor” but you want to declare them as “AMovingCube”, in order to really change a class name you should use Visual Studio’s rename feature and it will take care of everything, then you have to close the project and regenerate project files. Then open it again and you should be fine.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.