[Solved] Error in creating object


#1

Hello everyone,
I am learning the openframework using oFBook. Currently i tried the ball bounce example in Oops! chapter, I wrote the program as given in book, still getting following error.

E0020 identifier “myBall” is undefined
E0020 identifier “myBall” is undefined
E0020 identifier “myBall” is undefined
Error C2065 ‘myBall’: undeclared identifier
Error C2228 left of ‘.setup’ must have class/struct/union
Error C2065 ‘myBall’: undeclared identifier
Error C2228 left of ‘.update’ must have class/struct/union
Error C2065 ‘myBall’: undeclared identifier
Error C2228 left of ‘.draw’ must have class/struct/union

So please provide me solution. I am using Visual Studio Community 2017.
you can see the original code on link :-
http://openframeworks.cc/ofBook/chapters/OOPs!.html

pic of my code is attached

Thanks in advance!!


#2

Previously I was using openframeworkextension. Now I created project using projectgenerator. It solved my problem.