0

I need help with running two function at the same time .
MultiThreading?

void Function1(int n)
{
while(n<10)
{
n++;
}
}
void Function2(int n)
{
while(n<20)
{
n++;
}
}

If these are the 2 functions,can someone tell me how I can start the 2 together from int main().I haven't been able to get it right from the internet.
Please type the code for this,if you can.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by nerdinator
0

>MultiThreading?
Multithreading, spawn multiple processes, or fake your own threading. The latter isn't recommended for real code, but it can be fun.

>Please type the code for this,if you can.
I'm not going to do your work for you, dude. You didn't even say what platform you're running on, which means any code you're given might not compile.

0


I'm not going to do your work for you, dude. You didn't even say what platform you're running on, which means any code you're given might not compile.

I am using visual c++.
This is not my final application,and I am only trying to learn the code concerned to these simple functions,so I can apply it elsewhere.
See if you can help me out. :S

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.