Need help by C++ challange Quest 1 No. 3 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

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

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

7th Jul 2017, 6:17 AM
Christian Liebel
Christian Liebel - avatar
5 Answers
+ 1
Would you please put the question here? 😃
7th Jul 2017, 7:23 AM
Oscar Albornoz
Oscar Albornoz - avatar
+ 1
1 Public 2 test * (to declare a pointer to that class) 3 -> (to access to foo method)
9th Jul 2017, 2:53 AM
Oscar Albornoz
Oscar Albornoz - avatar
+ 1
thank you now I have my certificate in C++ xD
10th Jul 2017, 5:36 PM
Christian Liebel
Christian Liebel - avatar
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
8th Jul 2017, 3:49 PM
Christian Liebel
Christian Liebel - avatar
0
Class test{ public: void foo(){ } }; Test_myPtr=new test(); myPtr__foo();
17th Jul 2021, 12:56 PM
lenard Cheruiyot
lenard Cheruiyot - avatar