c++ - Thread or class error c++11 -


when try compile following code g++ -std=c++11 -pthread following error , have no idea why.

#include<thread> using namespace std; void test (){ }  int main () {     thread t1 (test);     t1.join;     return 0; } 

8:9: error: statement cannot resolve address of overloaded function t1.join;

you missing parenthesis in call join:

t1.join(); //     ^^ 

live demo


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -