goodafternoon everybody.i am trying to create threads with Pthread library.i wrote my code and complided it.after compiling it i goet following syntax errors.
Warning 2 warning C4627: '#include <pthread.h>': skipped when looking for precompiled header use c:\users\222\documents\visual studio 2013\projects\lab2\lab2\lab2.cpp 3 1 lab2
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\222\documents\visual studio 2013\projects\lab2\lab2\lab2.cpp 24 1 lab2
Error 4 error C2143: syntax error : missing ',' before '*' c:\users\222\documents\visual studio 2013\projects\lab2\lab2\lab2.cpp 24 1 lab2
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\222\documents\visual studio 2013\projects\lab2\lab2\lab2.cpp 25 1 lab2
Error 6 error C2143: syntax error : missing ',' before '*' c:\users\222\documents\visual studio 2013\projects\lab2\lab2\lab2.cpp 25 1 lab2
someone can help me?
here is my code
If you're using a default windows compiler pthreads aren't supported, that's a unix thing. If you want to use threading in windows, you'll want to use the winapi relevant functions.
Unless low-level, platform-specific functionality is required (for instance, we want to use kernel-supported thread pools on Windows), consider using the standard C++ library.