Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • That's not valid C++, as a BOOK* cannot be implicitly converted to a void*. Commented Dec 24, 2010 at 12:55
  • 1
    @DeadMG any pointer may be implicitly converted to void*, both in C and C++. Only reverse conversion (from void* to ptr*) is prohibited in C++ Commented Dec 24, 2010 at 13:02
  • @user39662 : how approach 2 is less typesafe while 1 is not? Commented Dec 25, 2010 at 4:46