#keywords STL, shared_ptr, byte {{{+1 byte array }}} {{{#!gcode int length = 2000; byte* buf = new byte[length]; std::ifstream ifs(path, std::ios_base::in | std::ios::binary); if (ifs) { ifs.read((char*)buf, length); ifs.close(); } }}} {{{+1 shared_ptr }}} {{{#!gcode int length = 2000; std::shared_ptr buf(new byte[length]); //std::shared_ptr buf = std::shared_ptr(new byte[length]); std::ifstream ifs(path, std::ios_base::in | std::ios::binary); if (ifs) { ifs.read((char*)buf.get(), length); ifs.close(); } }}}