+ 4
Game timer please help!!!!!
Hello guys I want to create a game with timer the problem I don't know how to make it , so any ideas? thanks in advance.
8 ответов
+ 4
c++
+ 3
thanh you that was helpful , but do you know a way to run it in same time with another function?
I heard about thread but I don't know how to make one correctly
+ 3
thank you
+ 1
In what language?
+ 1
In java i use Threads, i will read how do it in c++, if i find a way, i'll back here.
+ 1
Hello, i don't know if it have error or if it doesn't work in my old phone, and i'm not with my cumputer... try this code.. but i think that you should do some research about "sleep" in c++.
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
void z() {Sleep(50);}
char x[] = "Hello! This program writes each letter after 0.05 seconds. And it finally works :)";
int main(){
for (int i=0;i<81;i++)
{
cout << x[i];
z();
}
getch();
return 0;
}
+ 1
What exactly you want create? i will send a lesson of sololearn where they talk about threads, but in java, so, you can put a Thread in your entire game, in all places that you want. sorry any thing, i'm learning english.