fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. const int BLOCK_SZ = 64 / (sizeof(char) * 8);
  5. typedef char block[BLOCK_SZ];
  6.  
  7. int main() {
  8. std::vector<block> ssx(10);
  9. ssx[0][0] = 'X';
  10. for (auto &i : ssx) {
  11. std::cout << i;
  12. }
  13.  
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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());
                                          ^
stdout
Standard output is empty