assuming the input for scanf is 01234567, you would want result[0] = 2 * 0? from the code you posted, you would get result[0] = 2 * 48, 48 being the ascii value for '0', so i think you want:...
Type: Posts; User: Dr_Regulus
assuming the input for scanf is 01234567, you would want result[0] = 2 * 0? from the code you posted, you would get result[0] = 2 * 48, 48 being the ascii value for '0', so i think you want:...
double number;
cin >> number;
(number == (int)number); //will be true if number is an int, otherwise it will be false.