1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#include <stdio.h> int *Calc( int *pFact ) { *pFact = 30; return pFact; } void Func( int **ppIn ) { printf( "%d" , **ppIn ); } int main( void ) { int *pHoge = NULL; pHoge = new int(10); Func( &(Calc( pHoge )) ); return 0; }
1 2 3
In function 'int main()': Line 19: error: invalid lvalue in unary '&' compilation terminated due to -Wfatal-errors.