[ create a new paste ] login | about

Link: http://codepad.org/wtBNLWZt    [ raw code | output | fork ]

C++, pasted on Jan 16:
1
2
3
4
5
6
7
8
9
#include <iostream>
#include <algorithm>

int main() {
	char orig[] = { 0, 1, 2, 3, 4, 5 };
	char bits[sizeof(orig)];
	std::copy(orig, orig+6, bits);
	std::cout << static_cast<int>(bits[3]) << std::endl;
}


Output:
1
3


Create a new paste based on this one


Comments: