Question: why does my code still have 4 errors in the ( int main ) section and will not run in eclipse? #include #include using namespace
why does my code still have errors in the int main section and will not run in eclipse?
#include
#include
using namespace std;
void countUp
int i;
fori ; i ; i
cout i endl;
void countDown
int i;
fori ; i ; i
cout i endl;
int main
thread countUpThreadcountUp;
countUpThread.join;
thread countDownThreadcountDown;
countDownThread.join;
return ;
here are the errors that I keep getting
srcModulePorfolio.cpp::: error: 'thread' was not declared in this scope
thread countUpThreadcountUp;
~~~~~
srcModulePorfolio.cpp::: error: 'countUpThread' was not declared in this scope
countUpThread.join;
~~~~~~~~~~~~
srcModulePorfolio.cpp::: error: expected ; before 'countDownThread'
thread countDownThreadcountDown;
~~~~~~~~~~~~~~
srcModulePorfolio.cpp::: error: 'countDownThread' was not declared in this scope
countDownThread.join;
~~~~~~~~~~~~~~
:: Build Failed. errors, warnings. took ms
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
