Ask coding questions

← Back to all posts
i have a problem with the library
Arleth_IvhyIvhy (0)

well,when i try to commit my code, i see that i need help to the ejecution becouse repli it copiler doesn´t have thread include, so i hope the you can solve my problema

SPQR (535)

Change the content of int main() to this:

	cout<< "Hola mundo"<<endl;
	thread* threadPares = new thread(ImprimirPares);
	threadPares -> join();
	thread* threadImpares = new thread(ImprimirImpares);
	threadImpares -> join();

The problem isn't with the thread library, it's with your variable names. (You had a couple misspellings, and you tried to make two threadParess.

Please mark this comment as the answer and upvote if I solved your problem :)