ok, I tried printing it out using printf("%x", x) and printf("%d",x) and got 0xFFFFFFFF and -1 respectively. So it looks like it is working. So my question is, why does cout print a wrong value?...
Type: Posts; User: redhawk87
ok, I tried printing it out using printf("%x", x) and printf("%d",x) and got 0xFFFFFFFF and -1 respectively. So it looks like it is working. So my question is, why does cout print a wrong value?...
I was trying to get a variable to represent all 1's. here is my code:
unsigned long long x;
x = ~0;
cout << x << endl;
when x is printed, it give me 18446744073709551615. I plug that into...
I misread a persons comment. Thought they were trying to say I was stupid cause the print statements I put there would not compile... I re-read and realized that was all in my head. I deleted the...
I was printing it out as %d instead of %f lol! gotta love stupid mistakes...
here are my variables:
unsigned int instCount;
unsigned int cycleCount;
//lots of code
double IPC = (double) instCount / cycleCount;
printf(//instructions);
printf(//cycles);
I am having troubler with simple division. I know this might be a stupid question but here is my code:
unsigned int totalCycles;
unsigned int cycleCount;
double IPC = (double) totalCycles /...