tags:

views:

152

answers:

1

what is the difference between void*, const void*, volatile void*, or const volatile void*?

please can u explain through the example program?

+1  A: 

Just a matching case of const correctness.

Const correctness

You only have volatile in place of const, and I hope that you understand the differences between const and volatile. And if you have Effective/More Effective C++ by Scott Myer's or the book by Herb Sutter there are articles which explain these in detail. They use const instead of volatile.

DumbCoder
both `const` and `volatile` define different types. `int`, `volatile int` and `const volatile int` are different types, for example.
Nick D