Need help by C++ challange Quest 1 No. 3 | Sololearn: Learn to code for FREE!

+1

Need help by C++ challange Quest 1 No. 3

Hello Community I can't finish it... pleas help my with the blanks.

c++

7/7/2017 6:17:33 AM

Christian Liebel

5 Answers

New Answer

+1

Would you please put the question here? 😃

+1

1 Public 2 test * (to declare a pointer to that class) 3 -> (to access to foo method)

+1

thank you now I have my certificate in C++ xD

0

Fill in the blanks to declare a class "test" with a "foo()" public member function. Declare a pointer "myPtr" to "test" andd call "foo()" via the pointer. Blank code: Class test{    ______:       void foo(){      } }; _____ myPtr = new test(); myPtr __ foo(); What I know at this moment: Class test{    public:       void foo(){      } }; Test_ myPtr = new test(); myPtr __ foo(); here it is

0

Class test{ public: void foo(){ } }; Test_myPtr=new test(); myPtr__foo();