Include i błąd. (Expected constructor...)

0

Witam, bardzo bym prosił o wyjaśnienie tego błędu. Otóż mam 3 pliki ( main , definicja , nagłówkowy - deklaracja ). Błąd przy kompilacji to :

LINE 4  \definicja.cpp expected constructor, destructor, or type conversion before '=' token
LINE 4   \definicja.cpp expected `,' or `;' before '=' token  

Deklaracja:

#ifndef DEKLARACJA_HPP
#define DEKLARACJA_HPP

extern int a;
#endif 

Definicja:

#include <iostream>
#include <conio.h>
#include "deklaracja.hpp"
a = 235; 

Main:

#include "definicja.cpp"
using namespace std;

int main()
 {
	cout << "A = " << a <<  endl;
	getch();
	return 0;
} 
0

w definicji też musisz podać typ...

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