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 =)

err...include header ?

#include<windows.h>

did not work....

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

commented: Great answerer, supplied a answer when no one else would. +0

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. =)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.