funkcja a adres struktury

0

Witam

Mam problem.Otóż napisałem funkcję która przekazuje adres struktury a nie całą strukturę.
Wcześniej napisałem taką samą funkcję tylko przekazującą całą strukturę.
Kiedy chcę skompilować wyskakuje mi komunikat : **Kod nie skompilowany.Skompilować ? **

#include <iostream>
struct pudlo
{
	char producent[40];
	float wysokosc;
	float szerokosc;
	float dlugosc;
	float objetosc;
};
void funkcja(const pudlo * a);
int main()
{
	using namespace std;
	pudlo patryk = 
	{
		"Fire Box",
		2.00,
		5.50,
		10.25,
		50.20
	};
	funkcja(&patryk);
	
	return 0;
}
void funkcja(pudlo   a)
{
	using namespace std;
	cout << "Producent: " << a.producent << endl;
	cout << "Wysokosc: " << a.wysokosc << endl;
	cout << "Szerokosc: " << a.szerokosc << endl;
	cout << "Dlugosc: " << a.dlugosc << endl;
	cout << "Objetosc: " << a.wysokosc * a.szerokosc * a.dlugosc << endl;
}
2
void funkcja(const pudlo * a);
//
void funkcja(pudlo   a)

...

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