#include <iostream>
using namespace std;
int* func() {
int *ptr = new int;
*ptr = 1200;
cout << "ptr points to " << *ptr << endl;
return ptr;
}
int main() {
int *x = func();
cout << *x << endl;
return 0;
}
#include <iostream> using namespace std; struct Node { int data; Node* next; }; class Stack { Node* top; public: Stac...
No comments:
Post a Comment