error C2447 w Microsoft Visual 2010 Express

0

Mam błąd error C2447 w Microsoft Visual 2010 Express bardzo proszę o dokładne wytłumaczenie.

Mam trzy pliki i nie wiem w którym jest błąd.

Pierwszy plik:

////////////////////////////////////////////////////////////////////////////
#include "gra.h"

using namespace std;




////////////////////////////////////////////////////////////////////////////
       //wynik
       string Names[10];             //10 najlepszych wynikow - imiona

	   unsigned int Scores[10];      //10 najlepszych wynikow - punkty

	   unsigned int score;           //punkty

	   string Imie;                  //imie gracza

       



////////////////////////////////////////////////////////////////////////////
void LoadData()
{



	return 0;
}

////////////////////////////////////////////////////////////////////////////
void SaveData()
{


	return 0;
}


////////////////////////////////////////////////////////////////////////////
unsigned int GetScore();
{
return score;
}

////////////////////////////////////////////////////////////////////////////
void SetImie( string imie )
{
	Imie = imie;
}

////////////////////////////////////////////////////////////////////////////
void SetScore( unsigned int score );
{
	score = ascore;
}


////////////////////////////////////////////////////////////////////////////



////////////////////////////////////////////////////////////////////////////
int main()
{

	getch();


	return 0;
}

Drugi Plik:

#include "gra.h"

using namespace std;


bool GameOver()
{  

	system("cls");

	cout<<"Przegrales"<<endl;


	getch();

	return 0;
}

bool StartGame()
{

	system("cls");

	cout<<"Gra!!!!!!!!!!"<<endl;

	getch();


	return 0;
}

Trzeci Plik:

#include <Windows.h>
#include <iostream>
#include <fstream>
#include <conio.h>
#include <string>

using namespace std;

//gra
bool StartGame();

//koniec gry
bool GameOver();

//ustawianie nazwy gracza
void SetImie( string imie );

//ustawianie punktow
void SetScore( unsigned int score );

//pobieranie ilosci punktow
unsigned int GetScore();

A więc bardzo proszę o pomoc!!!
Jak w trzeci plik widzicie np. 1. include...
to już poprawiłem ale nic...

0

Szukałem wszędzie są wszystkie {,} ale i tak mi nie działa dlaczego?

1
arceus12 napisał(a):

Szukałem wszędzie są wszystkie {,} ale i tak mi nie działa dlaczego?

Szukajcie, a znajdziecie.

unsigned int GetScore();

{

return score;

}
void SetScore( unsigned int score );

{

    score = ascore;

}
0

Ok ascore poprawiłem a dalej co bo i tak wyskakuje?

0

Zrobiłem poprawiłem i wyskakuje

1>------ Build started: Project: The Run test, Configuration: Release Win32 ------
1> gra.cpp
1>gra.cpp(8): error C2447: '{' : missing function header (old-style formal list?)
1>gra.cpp(21): error C2447: '{' : missing function header (old-style formal list?)
1> main.cpp
1>main.cpp(25): error C2447: '{' : missing function header (old-style formal list?)
1>main.cpp(34): error C2447: '{' : missing function header (old-style formal list?)
1>main.cpp(43): error C2447: '{' : missing function header (old-style formal list?)
1>main.cpp(51): error C2447: '{' : missing function header (old-style formal list?)
1>main.cpp(57): error C2447: '{' : missing function header (old-style formal list?)
1>main.cpp(68): error C2447: '{' : missing function header (old-style formal list?)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

0

Tak teraz wygląda mój plik:

1 plik:

////////////////////////////////////////////////////////////////////////////
#include "gra.h"

using namespace std;

////////////////////////////////////////////////////////////////////////////
//wynik
string Names[10]; //10 najlepszych wynikow - imiona

   unsigned int Scores[10];      //10 najlepszych wynikow - punkty

   unsigned int score;           //punkty

   string Imie;                  //imie gracza

   

////////////////////////////////////////////////////////////////////////////
void LoadData();
{

return 0;

}

////////////////////////////////////////////////////////////////////////////
void SaveData();
{

return 0;

}

////////////////////////////////////////////////////////////////////////////
unsigned int GetScore();
{

return score;

}

////////////////////////////////////////////////////////////////////////////
void SetImie( string imie );
{
imie = imie;
}

////////////////////////////////////////////////////////////////////////////
void SetScore( unsigned int score );
{
score = score;
}

////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////
int main();
{

getch();


return 0;

}

2 plik:

#include "gra.h"

using namespace std;

bool GameOver();
{

system("cls");

cout<<"Przegrales"<<endl;


getch();

return 0;

}

bool StartGame();
{

system("cls");

cout<<"Gra!!!!!!!!!!"<<endl;

getch();


return 0;

}

3 plik:

#include <Windows.h>
#include <iostream>
#include <fstream>
#include <conio.h>
#include <string>

using namespace std;

//gra
bool StartGame();

//koniec gry
bool GameOver();

//ustawianie nazwy gracza
void SetImie( string imie );

//ustawianie punktow
void SetScore( unsigned int score );

//pobieranie ilosci punktow
unsigned int GetScore();

0

szukam szukam ... możecie pomagać

0

Zamiast usunąć zbędne średniki to wszędzie je pododawałeś...

0

Udało mi się poprawić temat zamknięty

0 użytkowników online, w tym zalogowanych: 0, gości: 0