Hello,
I'm reading a 6502 programming book, and have decided to code every peice mentioned in the book, put it together and make it work.
so, i've got the boost libraries installed and am using 8 and 16 bit integer types. but i can't measure them( sizeof() only measures in bytes ) and i don't know how i can work with bits if i'm only measuring bytes.
anyone know of a solution to this? bi quyet lam giau
I'm reading a 6502 programming book, and have decided to code every peice mentioned in the book, put it together and make it work.
so, i've got the boost libraries installed and am using 8 and 16 bit integer types. but i can't measure them( sizeof() only measures in bytes ) and i don't know how i can work with bits if i'm only measuring bytes.
anyone know of a solution to this? bi quyet lam giau
Code:
#include <iostream>
#include <boost/cstdint.hpp>
using namespace std;
int main()
{
static const boost::int8_t int8;
cout << "sizeof(int8) = " << sizeof(int8) << endl;
return 0;
}
#include <boost/cstdint.hpp>
using namespace std;
int main()
{
static const boost::int8_t int8;
cout << "sizeof(int8) = " << sizeof(int8) << endl;
return 0;
}