I have a variable of type char [] with an address. Example: char addr[11] = "0x01234567";. How do I convert this variable to type uintptr_t?
I want it to be equivalent to uintptr_t add = 0x01234567;.
I have a variable of type char [] with an address. Example: char addr[11] = "0x01234567";. How do I convert this variable to type uintptr_t?
I want it to be equivalent to uintptr_t add = 0x01234567;.
 
    
     
    
    "0x01234567" is a textual representation of an integer. std::uintptr_t is an integer type. You can use any standard formatted input functions to do the conversion. There are several options, but I recommend starting with a string stream.
