Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int* rndFunc(){
- int *rndValue = new *int[5];
- return bar;
- }
- int main(void){
- int *foo;
- foo = rndFunc();
- delete[] foo; //this is the issue, I get an invalid pointer error.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement