0
.is there Anyone used threads for a program?
I understand threads but actually i never used it
5 odpowiedzi
+ 4
Hadi Mohseni
edit: Try using it in a code.
https://code.sololearn.com/cBoY5IZE73Vb/?ref=app
+ 4
Data
Sounds good!
What was the project, and what did use use to make it?
+ 3
Data
That is a cool project!
I am currenlty branching out to sfml after getting familar with sdl2.
+ 2
you have to carefuly plan how do you want to implement threads into your program. Quick solutions, like i once did, may actualy slow down the program
one time when i successfuly used threads is when i made a program that used a separate thread for drawing graphics on the window
+ 2
Manual in a window you could spawn "particles" with right mouse button, and when you press the left mouse button all the particles would attract to the mouse pointer. Drawing was done on a separate thread.
i made it in c++, also using SFML media library for graphics
also this was the first time i used dynamic vector arrays to store objects (particles in this case)