Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!

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.

1
  • 2
    +1, correct answer. @Gokul: Try this instead of line 6: const GOK_UINT8* tmp = reinterpret_cast<const GOK_UINT8*>(c); const pGOK_UINT8 y = tmp;. You will see the reinterpret_cast works fine, it's the type mismatch in the assignment that results in an error. That being said, be aware that your code exhibits about as many bad coding practices as it has lines... I hope this is for experimentation only. ;-) Commented Jul 29, 2010 at 8:26

lang-cpp