+ 1
Need help by C++ challange Quest 1 No. 3
Hello Community I can't finish it... pleas help my with the blanks.
5 Respostas
+ 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();