[ crnjin @ 19.05.2011. 14:24 ] @
za ovaj ko : Code: #include <iostream> #include <boost/threadpool.hpp> using namespace std; using namespace boost::threadpool; // Some example tasks void first_task() { cout << "first task is running\n" ; } void second_task() { cout << "second task is running\n" ; } int main(int argc,char *argv[]) { // Create fifo thread pool container with two threads. pool tp(2); // Add some tasks to the pool. tp.schedule(&first_task); tp.schedule(&second_task); // Wait until all tasks are finished. tp.wait(); // Now all tasks are finished! return(0); } potrebni su mi heder fajlovi iz foldera boost . Pokusao sam sa dir boost koji se nalazi u threadpool-0_2_5-doc.zip na http://threadpool.sourceforge.net/ ali sam uvideo da nemam sve potrebne heder fajlove u njemu. Skinuo sam boost sa http://sourceforge.net/projects/boost/files/boost/1.46.1/ Visual Studio mi ne dozvoljava da kopiram ceo folder u Header Files a kad ih ubacujem jedan po jedan (ima ih mali milion!) uvek bude fatallError ... Neko da pomogne ?? |