Link to home
Start Free TrialLog in
Avatar of vlas
vlas

asked on

c++ for dos qwestion.

How I make 2 or many threeds in one time  in Standart c++?

Example:1 Threed1-Drawing lines randomaly
               Threed2-working clock in the corner

Example:2 User work with my program wich doing somesing
           and on the corner of the screen work clock


Ok. Im use Turbo C++ version 1.01 1990 by Borland
     but run my program from Windows 98

Sorry for my ugly English.
Avatar of KangaRoo
KangaRoo

Depends on the OS and compiler. Which are you targetting / using?
Right.  Standard C++ provides no features for dealing with threads.  (Because many OSs/computers don't--or at least didn't--support threads and the ones that do support threads have very different ways of dealing with threads.)  So you must use an OSs-specific procedure to create a 2nd thread or use a extension to the standard C++ library to create the thread.   Use of these sort of techniques will make you code non-portable.  That is, it may not compile for other OSs or other compilers.  

Your question says DOS, but does does not support multiple threads.  If you mean windows, you can use _beginthread().
Avatar of vlas

ASKER

Edited text of question.
I'm not sure what you've changed to question but nietod's comment stands: there is no standard C++ for handling threads.
Please do not edit the question after discussion has started.  it makes it hard to follow.  You can post new information by posting comments to the question


You added the "standard c++" part.  But my entire point is that "Standard C++"  DOES NOT support this.

You must use functions provided by the OS or by a library.  For that reas on we must know what compiler and OS you are using.  (And if the OS is realy DOS, not windows, this will not be possible.)
Avatar of vlas

ASKER

Edited text of question.
ASKER CERTIFIED SOLUTION
Avatar of KangaRoo
KangaRoo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial