Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started