Skip to main content
gamedev.net
🔒 Locked

C++ Pointer from String

Started by noaktree 2 replies 1.6k views
Original Post
noaktree
noaktree
"this" might be easy but I've never done it. Say I have a char string "0064FDF0". How can I create a pointer from this string in C++?
game development is liek a state of mind man.. it's liek when you liek... think... and then you liek make it fun++

- Yes I'm drunk.
Dave Hunt
Dave Hunt
Quote:
Original post by Emmanuel Deloget
Transform this to an integer (this is an hex number, so it's not very complex) and cast the integer into a pointer.

HTH,


Of course, the next question is - "What are going to do with it now?" The address isn't likely to be valid in your program's context.

Why would you want to do something like this?
noaktree
noaktree
Thanks Emmanuel. You're always very helpful.
Quote:
Of course, the next question is - "What are going to do with it now?"
I'll add it to my list of stupid things I've done right next to eating soup from a plate.
game development is liek a state of mind man.. it's liek when you liek... think... and then you liek make it fun++

- Yes I'm drunk.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.