codice:
 
// Ora.h: interface for the Ora class.
//
//////////////////////////////////////////////////////////////////////
#include <string>
class Ora  
{
	friend ostream &operator<<(ostream & , Ora &);
public:
	Ora();
	virtual ~Ora();
	int setOra(int , int );
private:
	int min;
	int ore;
	char _ora;
};
codice:
// Ora.cpp: implementation of the Ora class.
//
//////////////////////////////////////////////////////////////////////
#include <iostream>
#include <iomanip>
#include "Ora.h"
using namespace std;

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Ora::Ora()
{

}

Ora::~Ora()
{

}


int Ora::setOra(int or, int mn)
{
	ore = or;
	min = mn;
	_ora = ore + ":" + min;
	return 0;
}

ostream &operator<<(ostream &out , Ora &or)
{
	out << or.ore <<":"<< or.min;
}
Ma mi da:
--------------------Configuration: ClassTest - Win32 Release--------------------
Compiling...
Ora.cpp
C:\Progetti\ClassTest\Ora.h(7) : error C2143: syntax error : missing ';' before '&'
C:\Progetti\ClassTest\Ora.h(7) : error C2433: 'ostream' : 'friend' not permitted on data declarations
C:\Progetti\ClassTest\Ora.h(7) : error C2501: 'ostream' : missing storage-class or type specifiers
C:\Progetti\ClassTest\Ora.h(7) : error C2244: 'ostream' : unable to resolve function overload
C:\Progetti\ClassTest\Ora.h(7) : error C2061: syntax error : identifier 'ostream'
C:\Progetti\ClassTest\Ora.h(7) : error C2501: '<<' : missing storage-class or type specifiers
C:\Progetti\ClassTest\Ora.h(7) : error C2805: binary 'operator <<' has too few parameters
C:\Progetti\ClassTest\Ora.cpp(28) : error C2440: '=' : cannot convert from 'char *' to 'char'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
C:\Progetti\ClassTest\Ora.cpp(34) : error C2248: 'ore' : cannot access private member declared in class 'Ora'
C:\Progetti\ClassTest\Ora.h(14) : see declaration of 'ore'
C:\Progetti\ClassTest\Ora.cpp(34) : error C2248: 'min' : cannot access private member declared in class 'Ora'
C:\Progetti\ClassTest\Ora.h(13) : see declaration of 'min'
Error executing cl.exe.

Ora.obj - 10 error(s), 0 warning(s)


Why????????????'


Help meeeeeeeee