Commit 9a831bdc authored by Nelson Phillips's avatar Nelson Phillips
Browse files

autosave

parent d0b57439
...@@ -87,13 +87,15 @@ Thread Sneko; ...@@ -87,13 +87,15 @@ Thread Sneko;
int main() int main()
{ {
thread first (charCall); // spawn new thread that calls input() thread first (charCall); // spawn new thread that calls input()
thread second (snakePrint); // spawn new thread that calls snakePrint(0) thread second (snakePrint); // spawn new thread that calls snakePrint(0)
cout << "Press w,a,s,d to begin."; cout << "Press w,a,s,d to begin.";
// synchronize threads: // synchronize threads:
first.join(); // pauses until first finishes first.join(); // pauses until first finishes
second.join(); // pauses until second finishes second.join();
cout << " lkfnwefnwefnwdklfnd";
return 0; return 0;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment