#include <iostream>
#include <vector>
const int BLOCK_SZ = 64 / (sizeof(char) * 8);
typedef char block[BLOCK_SZ];
int main() {
std::vector<block> ssx(10);
ssx[0][0] = 'X';
for (auto &i : ssx) {
std::cout << i;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgoKY29uc3QgaW50IEJMT0NLX1NaID0gNjQgLyAoc2l6ZW9mKGNoYXIpICogOCk7CnR5cGVkZWYgY2hhciBibG9ja1tCTE9DS19TWl07CgppbnQgbWFpbigpIHsKICAgIHN0ZDo6dmVjdG9yPGJsb2NrPiBzc3goMTApOwogICAgc3N4WzBdWzBdID0gJ1gnOwogICAgZm9yIChhdXRvICZpIDogc3N4KSB7CiAgICAJc3RkOjpjb3V0IDw8IGk7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0=
In file included from /usr/include/c++/4.8/vector:63:0,
from prog.cpp:2:
/usr/include/c++/4.8/bits/stl_uninitialized.h: In instantiation of ‘static void std::__uninitialized_default_n_1<true>::__uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = char (*)[8]; _Size = unsigned int]’:
/usr/include/c++/4.8/bits/stl_uninitialized.h:544:33: required from ‘void std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = char (*)[8]; _Size = unsigned int]’
/usr/include/c++/4.8/bits/stl_uninitialized.h:605:50: required from ‘void std::__uninitialized_default_n_a(_ForwardIterator, _Size, std::allocator<_Tp>&) [with _ForwardIterator = char (*)[8]; _Size = unsigned int; _Tp = char [8]]’
/usr/include/c++/4.8/bits/stl_vector.h:1225:28: required from ‘void std::vector<_Tp, _Alloc>::_M_default_initialize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = char [8]; _Alloc = std::allocator<char [8]>; std::vector<_Tp, _Alloc>::size_type = unsigned int]’
/usr/include/c++/4.8/bits/stl_vector.h:271:34: required from ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = char [8]; _Alloc = std::allocator<char [8]>; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<char [8]>]’
prog.cpp:8:30: required from here
/usr/include/c++/4.8/bits/stl_uninitialized.h:515:42: error: functional cast to array type ‘_ValueType {aka char [8]}’
std::fill_n(__first, __n, _ValueType());
^