Okay, couple of things..
1. You should use <iostream> without the .h extension.. the old <iostream.h> method has been depricated. (That is of course if your compiler is recent enough, which I believe it is.
2. You need to make the functions in the std namespace available to your program. You can do this a couple of ways by using the "using" directive.
either
Code:
#include <iostream>
using namespace std;
int main(void)
{
// code
return 0;
}
or since you are only using a couple of the functions you can explicitly include them as below.
Code:
#include <iostream>
using std::cout;
using std::cin;
int main(void)
{
// code
return 0;
}
You may also in your code use std::cout directly in the body of your code.
3. insanityclownZ is not declared anywhere. You must declare a variable before you use it, or in the case of C++ you can declare it when you use it for the first time.
4. You cannot compare strings or arrays of characters using the == operator. You can do this a couple of ways too, using the strcmp() function is one.. You would have to include the <cstring> header file.
I have modified your code, so that upon entering the string "exit", it will execute the code that you wanted to execute.
Code:
#include <iostream>
#include <cstring>
// Or you can use "using namespace std;"
using std::cout;
using std::cin;
int main(void)
{
char insane[100];
char insanityclownZ[] = "exit";
cout<<"### m4 installer v0.1 ###";
cout<<"\n";
cout<<"### (c) Microsoft 2002 ###";
cout<<"\n";
cout<<"### Testers: DO NOT GIVE THIS TO YOUR FRIENDS OR ANYBODY ELSE ###";
cout<<"\n";
cout<<"### Press enter to begin. ###";
cout<<"\n";
cin>>insane;
if(strcmp(insane, insanityclownZ) == 0)
{
cout<<"WTF ! How did you know?\n";
cout<<"If you read the source code you die! insanityclownz";
}
cin.get();
return 0;
}