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.

>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.


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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.