![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
How do I check whether the object q1 exists? ie: q1=new queue has been called?How do I check whether the object q1 exists? ie: q1=new queue has been called?
In Main CPP / C++ / C Code:
Partial Body of Menu Code CPP / C++ / C Code:
Partial Body of Enqueue Code CPP / C++ / C Code:
Because if I call the enqueue(), the program is going to crash. Testing whether q1==NULL doesn't seem to help. Any suggestions? Thanks. |
|||
|
#2
|
||||
|
||||
|
Hi. Why don't you set it to NULL when you define it?
CPP / C++ / C Code:
That should point the pointer to 0 (undefined). Then you should be able to test whether it is there by: CPP / C++ / C Code:
__________________
The best damn Sports Blog period. |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The