Pointer to member functions

0 Eduard Hasanaj · July 12, 2015
Hello. thanks for tutorials
I have two classes that use each other

class Class1{
    void (Class2::*point)(string)=& Class2::printSomething();//error
        public:
        void a1(){
            string a;
            cin >> a;


        }

};
class Class2{

    public:
        void printSomething(string a){
        cout << "My favourite lang is : " << a;
        }

};
At void pointer I has an error. How to ccorrect

Post a Reply

Replies

Oldest  Newest  Rating
0 Adam Tindall · July 18, 2015
you still need help with this ed?
  • 1

C++

107,272 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator