I have a situation where I have a char *, called number, which will either contain a decimal number in the form of ("123") or a hexadecimal number in the form ("0x123"), where 123 is arbitrary;
What is the best way to convert this string to an integer considering I don't know which format the char * will be in?