473,473 Members | 2,319 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Threads in c++.

Hi.....

I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....

Thank you.....

Oct 25 '07 #1
10 1961
Harsha wrote:
Hi.....

I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....
Wrong group. Ask in a Borland newsgroup or a Windows programming newsgroup.

See FAQ 5.9 http://www.parashift.com/c++-faq-lit...t.html#faq-5.9
Oct 25 '07 #2
Harsha wrote:
Hi.....

I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....
If you're on Windows, see 'CreateThread' API function and/or
'beginthread' (POSIX?), but neither of them is standard C++, they
are platform-specific. C++ language is *not* thread-aware.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Oct 25 '07 #3
"Harsha" <ha********@gmail.comwrote in message
news:11**********************@22g2000hsm.googlegro ups.com...
Hi.....

I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....
Threads are OT for this newsgroup. I can suggest
comp.programming.threads
but this is a rather low level question even for them.

I would suggest you first google for some thread source code in C++ for your
compiler, download and play with it then ask in comp.programming.threads
when you get stuck.
Oct 25 '07 #4
Harsha wrote:
Hi.....

I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....
Best way to do threads in C++ is to use some-one else's work. boost or
Austria C++ provide interfaces to threading.
Oct 25 '07 #5
On Oct 25, 9:52 pm, "Jim Langston" <tazmas...@rocketmail.comwrote:
"Harsha" <harsha1...@gmail.comwrote in message
news:11**********************@22g2000hsm.googlegro ups.com...
I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....
Threads are OT for this newsgroup.
Could you point to something in the charter which supports that.
Discussion of a system specific threading API is off topic, but
that's really not a good way to go anyway. It's far better use
a portable abstraction layer over the system API, something like
Boost::threads.

Beyond that, general questions about threaded code are on topic,
even if the standard doesn't (yet) mention the word threads.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Oct 26 '07 #6
On Oct 25, 10:27 pm, Gianni Mariani <gi4nos...@marian.wswrote:
Harsha wrote:
Hi.....
I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....

Best way to do threads in C++ is to use some-one else's work. boost or
Austria C++ provide interfaces to threading.
I've noticed the OP uses Turbo 3.0. That's quite an old compiler.
I wonder if boost supports it. I'm saying wonder because I've not
in particular looked at boost's implementation. I've noticed that
boost does not mention the compiler in its regression test summary:

http://engineering.meta-comm.com/boo...er/thread.html

Regards,

Werner
Oct 26 '07 #7
Harsha wrote:
Hi.....

I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....
That's an ancient compiler, waaaay pre-standard. I first used that in
1992. I'd suggest moving up if at all possible.

Brian
Oct 26 '07 #8
On Oct 26, 2:26 am, James Kanze <james.ka...@gmail.comwrote:
On Oct 25, 9:52 pm, "Jim Langston" <tazmas...@rocketmail.comwrote:
"Harsha" <harsha1...@gmail.comwrote in message
news:11**********************@22g2000hsm.googlegro ups.com...
I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....
Threads are OT for this newsgroup.

Could you point to something in the charter which supports that.
Discussion of a system specific threading API is off topic, but
that's really not a good way to go anyway. It's far better use
a portable abstraction layer over the system API, something like
Boost::threads.
If Boost::threads is on topic (and I think it should be), it is kind
of hard to rule out specific threading APIs, since the guts of the
boost library deal with that. It seems like it would be
a lot simpler if we draw the line at C++. If a post doesn't have
any clear connection to C++, I think its reasonable to ask why they
posted to this newsgroup.

Brian Wood
Ebenezer Enterprises

Oct 26 '07 #9
On Oct 26, 5:07 pm, werasm <wer...@gmail.comwrote:
[...]
I've noticed the OP uses Turbo 3.0. That's quite an old compiler.
I wonder if boost supports it. I'm saying wonder because I've not
in particular looked at boost's implementation. I've noticed that
boost does not mention the compiler in its regression test summary:
It's another question, but of course, the OP really should
upgrade. The language which Turbo 3.0 supported is very little
like the language we discuss here.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Oct 27 '07 #10
On Oct 26, 7:57 pm, c...@mailvault.com wrote:
On Oct 26, 2:26 am, James Kanze <james.ka...@gmail.comwrote:
On Oct 25, 9:52 pm, "Jim Langston" <tazmas...@rocketmail.comwrote:
"Harsha" <harsha1...@gmail.comwrote in message
>news:11**********************@22g2000hsm.googlegr oups.com...
I need to develop a program for my academic project using
graphics in c++. I want to do it using THREADS so that it can have
mouse interface while accepting input...I want to know how to
implement threads in c++, and im using TURBO C++ 3.0
compiler....Please help....
Threads are OT for this newsgroup.
Could you point to something in the charter which supports that.
Discussion of a system specific threading API is off topic, but
that's really not a good way to go anyway. It's far better use
a portable abstraction layer over the system API, something like
Boost::threads.
If Boost::threads is on topic (and I think it should be), it is kind
of hard to rule out specific threading APIs, since the guts of the
boost library deal with that.
Discussion of how to implement the Boost library on a particular
system wouldn't be on topic, I don't think. But Boost tries to
be (and generally is) fairly portable; you can use the Boost
library on Windows or on Unix.
It seems like it would be a lot simpler if we draw the line at
C++. If a post doesn't have any clear connection to C++, I
think its reasonable to ask why they posted to this newsgroup.
The problem is defining C++. The classical criterion is that if
the answer would be the same in all languages, but would vary
from one platform to the next, it's off topic, but if the answer
would be different in other languages, but be the same for most
implementations of C++, it's on topic.

There are definitely threading issues which are purely C++, and
are on topic here (e.g. synchronization requirements for the
initialization of a local static variable). There are
definitely threading issues which aren't (e.g. anything
concerning a platform specific API). Most of the threading
issues fall somewhere inbetween---there are a lot, for example,
which would be the same for more or less any language, but which
are also platform independent. Over all, I'm in favor of
accepting them, if for no other reason than that the standards
committee has decided to add threading to the next version of
C++, and is actively discussing them as well.

In this particular case, of course, the Boost interface is
certainly relevant---it's independent of the system you're using
(as long as you're under Windows or Unix, at least), and it is
definitly only a C++ issue.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Oct 27 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ronan Viernes | last post by:
Hi, I have created a python script (see below) to count the maximum number of threads per process (by starting new threads continuously until it breaks). ###### #testThread.py import...
0
by: Al Tobey | last post by:
I was building perl 5.8.2 on RedHat Enterprise Linux 3.0 (AS) today and noticed that it included in it's ccflags "-DTHREADS_HAVE_PIDS." I am building with -Dusethreads. With newer Linux...
6
by: m | last post by:
Hello, I have an application that processes thousands of files each day. The filenames and various related file information is retrieved, related filenames are associate and placed in a linked...
34
by: Kovan Akrei | last post by:
Hi, I would like to know how to reuse an object of a thread (if it is possible) in Csharp? I have the following program: using System; using System.Threading; using System.Collections; ...
3
by: bygandhi | last post by:
Hi - I am writing a service which will check a process and its threads for their state ( alive or dead ). The process has 5 .net managed threads created using thread.start and each have been...
10
by: [Yosi] | last post by:
I would like to know how threads behavior in .NET . When an application create 4 threads for example start all of them, the OS task manager will execute all 4 thread in deterministic order manes,...
6
by: RahimAsif | last post by:
Hi guys, I would like some advice on thread programming using C#. I am writing an application that communicates with a panel over ethernet, collects data and writes it to a file. The way the...
3
by: mjheitland | last post by:
Hi, I like to know how many threads are used by a Threading.Timer object. When I create a Threading.Timer object calling a short running method every 5 seconds I expected to have one additional...
10
by: Darian | last post by:
Is there a way to find all the thread names that are running in a project? For example, if I have 5 threads T1, T2, T3, T4, T5...and T2, T4, and T5 are running...I want to be able to know that...
4
by: tdahsu | last post by:
All, I'd appreciate any help. I've got a list of files in a directory, and I'd like to iterate through that list and process each one. Rather than do that serially, I was thinking I should...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.