// Hello.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <Windows.h>
#include <time.h>
{
using namespace std;
int main();
char response;
cout<<"Hello, I am your computer"<<"\n";
Sleep(2000);
cout<<"I like to take long walks on the beach"<<"\n";
Sleep(2000);
cout<<"These long walks help me clear my mind"<<"\n";
Sleep(2000);
cout<<"Do you like to clear your mind? (Y/N)"<<"\n";
cin<<response"\n";
{
if (response == 'Y');
Yeah me too;
}
{
else if (response == 'N');
You should learn to like it;
}
Sleep(2000);
system ("pause");}
#include "stdafx.h"
#include <iostream>
#include <Windows.h>
#include <time.h>
{ no need of this bracket
using namespace std;
int main(); you have put a ; here indicating your main has ended
char response;
cout<<"Hello, I am your computer"<<"\n";
Sleep(2000);
cout<<"I like to take long walks on the beach"<<"\n";
Sleep(2000);
cout<<"These long walks help me clear my mind"<<"\n";
Sleep(2000);
cout<<"Do you like to clear your mind? (Y/N)"<<"\n";
cin<<response"\n"; << required before "\n"
{ error causing bracket
if (response == 'Y'); you have put a ; here indicating your if has ended
Yeah me too; missing cout
} error causing bracket
{ error causing bracket
else if (response == 'N'); you have put a ; here indicating your main if ended
You should learn to like it; missing cout
} error causing bracket
Sleep(2000);
system ("pause");} error causing bracket
no value returned in main
If this was your first program you should not jump into C++ like this. Start a tutorial or something from very BEGINNING. You will soon get frustrated otherwise. You can visit http://recurseit.blogspot.com for code snippets and tips...
You should put using namespace std under #include<time.h>. Also, you need to put int main() at the top. This is why the error is showing up. You need to do this: