A
a
Hi
I would like to have a function to process an input integer and return the
result. The following code will generate a memory leak. How should I write
this idea properly?
Thanks
int func(int num){
//process the num, counting the loop
int result;
return result;
}
main(){
int result;
result = func(7);
}
I would like to have a function to process an input integer and return the
result. The following code will generate a memory leak. How should I write
this idea properly?
Thanks
int func(int num){
//process the num, counting the loop
int result;
return result;
}
main(){
int result;
result = func(7);
}