Joined
Last Seen
-4 Reputation Points
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
20% Quality Score
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
0 Endorsements
Ranked #54.9K
Re:
[quote]Hi all,I have written a program in c++ using visual studio 2008.I've create only one source file and written all the codes including header files within .cpp extension and program is running well.But I want to split this program like [code] .h extension [/code] be present into the header file … |
|
[code] int main() { int *ptr=new int (100); cout<<"p's add is "<<ptr<<endl; cout<<"value in p is"<<*ptr<<endl; delete ptr; // deallocation of ptr; cout<<"p's add is "<<ptr<<endl; cout<<"value in p is"<<*ptr<<endl; return 0; } [/code] Even the delete operator is executed, the last two output statements are working same the first … |