anybody know how to run I need to run 2 class simultanously
anybody know how to run I need to run 2 class simultanously
"Running a class" is a concept I don't understand.
Could you take like at least 1 minute to write a clear question ? 15 seconds is not enough if you want other people to understand what you mean.
I hate real numbers.
I think you mean you want to call two methods at the same time. This is impossible on single core processors. Your operating system tricks you into thinking that it performs many tasks at once.
To achieve what you want, however, you should look into threads.
I'm making a 'app but I need to run run 2 classes at the same time on different threads.
Last edited by nooneelse; 09-13-2008 at 10:23 AM.
It would help if you told us what OS you plan to run them on, since threads are OS specific.
"I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008
"the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010
If you're from a Java background, note that in C++, you don't run classes, you run functions.
Well, I don't totally disagree with what you are saying, but you do can find some portable (well, portability is relative; but more portable than using OS specific function calls) thread libraries (example: Boost thread, OpenMP).
OpenMP is great because it's simple and it does have some acceptable support (Visual Studio and GCC supports it, plus some other compilers that I don't use).
I hate real numbers.