Click here to Skip to main content
15,915,093 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have an assignment to make till machine in c++ using pointers
Posted
Updated 9-Jun-11 4:28am
v2

CTill* pTill = new CTill();
pTill->DoStuff();
exit(0);
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 10-Jun-11 13:01pm    
My 4. Also delete pTill, or, better yet, don't use the pointer, create it on stack :-)
--SA
Richard MacCutchan 11-Jun-11 4:45am    
Ah, but the question specifically requires the use of pointers.
Sergey Alexandrovich Kryukov 12-Jun-11 22:37pm    
I don't accept questions requiring what to use, by many reasons some of which are apparent, but I appreciate use paid attention. Then you should delete pTill.
--SA
Richard MacCutchan 13-Jun-11 5:36am    
You are right. However, the OP states that this is an assignment so I presume the tutor is trying to teach his students the use of pointers as much as how to do some calculations. I feel sure the original question was clearer than what has been posted here.
post some code what your problem ist...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900