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.
vlasAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
KangaRooConnect With a Mentor Commented:
Unfortunately you can not use threads with that system. The old compiler will not be able to use these features from Win95/98.

If you want to use multi threading you'll have to upgrade to a newer compiler.

Note that there are 'systems' that implement something that looks like multi threading under Dos.
0
 
KangaRooCommented:
Depends on the OS and compiler. Which are you targetting / using?
0
 
nietodCommented:
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().
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
vlasAuthor Commented:
Edited text of question.
0
 
KangaRooCommented:
I'm not sure what you've changed to question but nietod's comment stands: there is no standard C++ for handling threads.
0
 
nietodCommented:
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.)
0
 
vlasAuthor Commented:
Edited text of question.
0
All Courses

From novice to tech pro — start learning today.