Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Anything to/from a hex string
#4
(01-05-2010, 08:34 AM)g4143 Wrote: I just quickly scanned your code...does it provide a method/way to handle pointers values?

No, it just blindly works with the data it is provided. If the data you provide it contains a pointer to something than the function will just blindly write out the pointer as the memory address it is pointing at.

This is just designed to be used with simple structs, and quite frankly shouldn't be used for anything else.

If you want to serialise/parse a class or anything more complicated (like something with member functions) that I would strongly recommend adding serialise/parse functions to your classes that write out data member variable by member variable since it avoids all sorts of issues you can get with this method such as different compilers packing classes in different ways. This method simply exists for the writeGeneric, and readGeneric functions in my data I/O class (a function which I recommend avoiding, and only really use for writing out GUIDs).
[Image: sig.php]
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.
Reply


Messages In This Thread
RE: [Tutorial] Anything to/from a hex string - by MrD. - 01-05-2010, 02:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  String Related Question TheLifelessOne 0 521 02-13-2010, 05:31 PM
Last Post: TheLifelessOne

Forum Jump:


Users browsing this thread: 2 Guest(s)