its ok.
4 things annoy me:
1. the apple logo as your avatar. (winfag here)^^
2.
what about errors?
createthread can fail etc.
add a logfunction, or debugoutput.
is quite easy and helps alot on finding bugs especially for a beginner.
3.
indentations?
make your code like this:
Code:
for (int i = 0; i < 10; i++)
{
if (i < 5)
{
printf("hi");
}
else
{
printf("bye");
}
}
4.
use proper function names and/or use comments
NFD();
what i like:
1.
you use brackets well and are not doing **** like this:
Code:
void myFunction(bool somebool) {
if (somebool)
printf("i am a noob");
}
whats bad about this code you ask?
using the '{' right after your function name just sucks and makes your code crabbed while using it in a single line is easy to see which brackets are together.
just not worth sparing this single line...
Code:
if (...)
singleline command here
you may heard that a project is NEVER really finished.
just type the {} always then you dont have to set them later.
also makes your code easier to read and prevents some logical mistakes.
not bad, but as infinite already said, start with the basics and not some c+p barely understood code.
same with your first mistake with 'void thread(...'.
just take a look in the msdn they describe most things very well there.