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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
vlasAuthor Commented:
Edited text of question.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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
KangaRooCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.