You mean varible++; , or variable += 1; ?
Perhaps you could go to the extreme of doing it with bit operators(I have for fun), or using the inline assembler to do it. So many options, but which is right for you?
MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116
MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116
Why are you making this so complex???
vector<char> container;
cout << "i = 0; i++ till 255" << endl;
for(int i = 0; i < 256; i++)
{
container.push_back(i);
cout << '.';
}
cout << endl << "Printing: ";
for(int i = 0; i < container.size(); i++)
{
cout << bitset<numeric_limits<char>::digits>(container[i]) << endl;
}
MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116
Just specify the datatype you want in the template parameter, from char to something like short, int, whatever.
MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116