Threading in c++

Jun 29, 2014 at 4:34pm
1
2
3
4
Hey Bro I want to learn about threading in c++ 
If you guys plz help how should i start with threading in c++???
I have no concepts about threading so plz 
consider that while you suggest!!!!!!!
Jun 29, 2014 at 4:44pm
Jun 29, 2014 at 5:16pm
why did you place your question in a code box? And also, what experience do you currently have with C++? It's recommended you have a general understanding of the language before jumping into parallelism
Jun 29, 2014 at 5:49pm
Yes i have a lot experience with c++
And i have a lot of practice
Jun 29, 2014 at 5:53pm
You should take a look at using std::future for asynchronous programming, it's a new concept introduced with C++11 and it very powerful. Do you have a specific goal in mind? there are many ways you can parallelize code in c++, depending on what you are trying to accomplish
Last edited on Jun 29, 2014 at 6:05pm
Jun 29, 2014 at 6:46pm
Actually i want to make a snake game and cin >> stream pauses the console until the input is given
i want that my snake keep on running and when i press w it moves upwards and when i press d it moves downwards
Jun 29, 2014 at 9:27pm
the console is not a place to create games, let alone what you described. Look into graphical frameworks if you want to create a game such as snake.
Jun 29, 2014 at 9:32pm
...or you could use sytem API and get check keyboard state asynchronously, or subscribe to keyboard events. You do not even need threading for that.

Jun 30, 2014 at 1:57pm
Actually the peoblem is that i don't know graphical interface in c++
tell me what should be the best way to learn windows programming and
which should be the best book to guide me on graphics in c++ ....
Jun 30, 2014 at 2:32pm
Topic archived. No new replies allowed.