I made a script and it keeps saying error C2144 and fatal error C1004

#include <iostream>

using namespace std

;char name[20];
int helps
void checkOutVillage (void);

int main(void);
{
	std::cout <<"Please Enter Your Name!" <<std::end1;
	cin >> name;
	std::cout << "You Are On A Great Quest" << name std::end1;
    std::cout << "There Is A Small Village In Trouble. Should We Help Them?" <<std::end1;
	std::cout<< "(enter for yes and 2 for no)" << std::end1;
    cin >> help;

	if help == 1
	{
		checkOutVillage();
	}
	else
	{
		std::cout << "You Suck!" <<name << "You Are No Fun At All!!" << std::end1;
		system("pause");
	}return 0;
}

void checkOutVillage(void)
{
	int goblinAnswer;

	std::cout << "well we go check out the village!!" <<std::end1;
    std::cout << "There are crazy goblins attacking" <<std::end1;
	std::cout << "You should Help!" <<std::end1;
	std::cout << "(enter 1 for yes and 2 for no) " <<std::end1;
	cin >> goblinAnswer;

	if goblinAnswer ==1)
	{
		std::cout <<"We go kill all the goblins and they die...we win...WE ROCK!!!" << std::end1;
		system("pause");


	}
	else
    {
	    std::cout << "You Suck!!! The Goblins killed everyone and now they are coming for us!!! way to go..." <<std::end1;
		system("pause")
	}

}

please help me

Recommended Answers

All 2 Replies

Sorry to tell you, but there are *a lot* of thing wrong with your code.

I'll give a few examples: int main(void); What's that semicolon doing there? << name std::end1; What the hell is name std::end1;? if help == 1 you prob mean : if (help ==1) system("pause") missing semicolon

etc etc.

Check your program one line at time for syntax-errors. Most of them are pretty easy to spot/

Have you ever seen any C++ syntax description?
There are tons of syntax and semantics errors and wrong names in your source.
1. endl is ENDL, not END-one.
2. Add semicolon after names declaration.
3. Delete semicolon after main header (write int main() without old-fashioned (void) ).
4. Insert << in output statements (some occurences).
5. if header syntax: if (expression) , insert missed parenthesis.
6. Declare undeclared variables.

Ooh! It's not all...
Do it yourself then come back...

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.