Using a class function in int main()

前端 未结 6 968
悲哀的现实
悲哀的现实 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:24

    karlphillip was right, you need to pass by pointer instead of reference

    BTW, following line are mistake also, the pthread_create accept and pthread_t instead of pthread_mutex_t

    pthread_create( &mutex1, NULL, reader_writer, void);

    pthread_create( &wrt, NULL, reader_writer, void);

提交回复
热议问题