does a program work in all cases?

D

Default User

Random832 said:
though, >> that it doesn't actually forbid NULL expanding to
((void*)0) - a >> compiler could special-case this to not be an error
when assigned to >> other pointers.

Right. Like I said, it misses the point of having void * at all.

No, it doesn't. It provides a way to pass any pointer INTO a function.
So at best you could say it misses half the point of a void*.

In actual practice, void* isn't used much in C++. Generally you use
function overloading or pointers to a family of types, relying on
runtime polymorphism.




Brian
 
P

pete

Default said:
No, it doesn't. It provides a way to pass any pointer INTO a function.

You could do that much with a pointer to char,
before there was such a keyword as "void", in the 1970's, man!
 
D

Default User

pete said:
You could do that much with a pointer to char,
before there was such a keyword as "void", in the 1970's, man!

Not without casting every usage. That's what Random832 was complaining
about.



Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top