Basically everyone should laugh at how stupid this may sound but this code is somehow wrong... which is funny because it is as simple as hello world....

#include "stdafx.h"
#include <iostream>
using namespace std;

int main(void)
{

	cout << "Wake up, Neo.\n";
	Sleep(6000);
	cout << "The Matrix has you.\n";
	Sleep(6000);
	cout << "Follow the white rabbit.";
	Sleep(6000);
	cout << "Knock knock, Neo.\n";
	Sleep(5000);
}
}

I am getting these errors...

c:\users\zlap\documents\visual studio 2010\projects\fdgdsffd\fdgdsffd\fdgdsffd.cpp(9): error C3861: 'Sleep': identifier not found
c:\users\zlap\documents\visual studio 2010\projects\fdgdsffd\fdgdsffd\fdgdsffd.cpp(11): error C3861: 'Sleep': identifier not found
c:\users\zlap\documents\visual studio 2010\projects\fdgdsffd\fdgdsffd\fdgdsffd.cpp(13): error C3861: 'Sleep': identifier not found
c:\users\zlap\documents\visual studio 2010\projects\fdgdsffd\fdgdsffd\fdgdsffd.cpp(15): error C3861: 'Sleep': identifier not found
c:\users\zlap\documents\visual studio 2010\projects\fdgdsffd\fdgdsffd\fdgdsffd.cpp(17): error C2059: syntax error : '}'
c:\users\zlap\documents\visual studio 2010\projects\fdgdsffd\fdgdsffd\fdgdsffd.cpp(17): error C2143: syntax error : missing ';' before '}'
c:\users\zlap\documents\visual studio 2010\projects\fdgdsffd\fdgdsffd\fdgdsffd.cpp(17): error C2059: syntax error : '}'

what am i missing... i was doing it for fun =)

it works.....remove the last bracket... "}"

Comments
Great answerer, supplied a answer when no one else would.

thank you... saved me hours... you don't even know. I raised your rep +2. Well worth it... can't believe i did not think of that first. =)

This article has been dead for over six months. Start a new discussion instead.