int *func(void); void main(void) { int* mass = NULL; .... mass=func(); } int* func(void) { int* ret = new int[10]; .... return ret; }