fork(3) download
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4.  
  5. int main() {
  6. std::vector<std::string> foo{{"blee"}, {"bleck"}, {"blah0000000000000000000000000000000000000000000000000000000000000000000000000000000000"}};
  7. std::string *temp = foo.data();
  8. char*** bar = reinterpret_cast<char***>(&temp);
  9.  
  10. for (size_t i = 0; i < foo.size(); ++i){
  11. std::cout << (*bar)[i] << std::endl;
  12. }
  13. }
Success #stdin #stdout 0s 3232KB
stdin
Standard input is empty
stdout
blee
bleck
blah0000000000000000000000000000000000000000000000000000000000000000000000000000000000