Condividi tramite


Errore del compilatore C2562

'identifier': funzione 'void' che restituisce un valore

Osservazioni:

La funzione viene dichiarata come void ma restituisce un valore.

Questo errore può essere causato da un prototipo di funzione non corretto.

Questo errore può essere risolto se si specifica il tipo restituito nella dichiarazione di funzione.

Example

L'esempio seguente genera l'errore C2562:

// C2562.cpp
// compile with: /c
void testfunc() {
   int i;
   return i;   // C2562 delete the return to resolve
}