So currently i want to run two functions at once but idk if that's possible without threads
1 2 3 4 5 6 7 8 9 10 11
void runbot4() {
printf("Second one started");
Sleep(1000);
printf("I run while the Add Bot Adds!");
}
void addbot1() {
printf("i'm the first bot");
int z = x + y;
printf("Z Equals: %d", z);
}
So could i have these both run at the same time without having to use threads and just have int main start both or would i have to start one and have the other run on a thread?
You can't do it without threads or similar. There are similar to thread event-driven constructs that can do it also. None of this is really C++ language, more of hooks to OS.