Never mind. Every move to the left is the the power of 2. I re-read the tutorial and picked up really fast. Sorry guys XD. Misread things.
Type: Posts; User: gnewfenix
Never mind. Every move to the left is the the power of 2. I re-read the tutorial and picked up really fast. Sorry guys XD. Misread things.
So I just finished reading the bitwise operators tutorial. I read that using the leftshift operators, one can raise a number to a power.
[variable]<<[number of places]
In my code I've done...
#include <cctype> has a function for that called isdigit(). Here's an example of it.
if(isdigit(a))
cout << "digit" << endl;
else
cout << "character" << endl;