Using a class function in int main()

前端 未结 6 956
悲哀的现实
悲哀的现实 2020-12-20 09:49

I am having problems calling my functions from my main program.
These functions HAVE to be in my class.
How do I access them from my int main()?

#inc         


        
6条回答
  •  不思量自难忘°
    2020-12-20 10:25

    You can either declare those methods as static or use an object to make the calls:

    myCountingSemaphoreUsingBinarySemaphore s;
    s.waitSemaphore(wrt);
    

提交回复
热议问题