My best/messiest code so far (work in progress)
etian (31)

So as no one knows, for school I've been working on a tic tac toe game and its pretty fun! I tried doing some coding now but I look through all the code and its completely fine but I guess my home wifi is too laggy. :/

You are viewing a single comment. View All
Highwayman (225)

Um.
usleep(777777);

Highwayman (225)

@etian sorry your right, should explain myself lol.

Is usleep doing seconds? Because if so, then why am I waiting for, like, hours? If not, then flush your streams after using any type of function that makes you wait - it just makes output show up. I don’t know why exactly for reasons I don’t care to explain, but it does work. So. Yeah.

Highwayman (225)

@Highwayman

cout << "Hello " << flush;
usleep(6738);
cout << "world." << flush;
nt998302 (5)

@Highwayman Usleep refers to Milliseconds

nt998302 (5)

@Highwayman Can You check out my game, it's called A Story. You seem like you know what you're doing and feedback would be great!

Highwayman (225)

@nt998302 sure, but I would take my suggestions with a grain of salt. I’m not terribly experienced.

etian (31)

@Highwayman o no haven't tried it yet I just didn't know how to respond.Thanks

Highwayman (225)

@etian XD oh lol. Yw! I hope if fixes it for you.

nt998302 (5)

Does anyone know how to code C++ in Unreal 4?

Highwayman (225)

@nt998302 thanks! I was wondering how I was going to tell you stuff.

etian (31)

@nt998302 I think microseconds

etian (31)

@Highwayman I figured out the problem, I had the > the wrong way :/

sanjaykdragon (181)

@etian use std::this_thread::sleep_for and std::chrono::seconds/milliseconds/microseconds instead of usleep and defaulting to milliseconds. Makes your code much more readable.