title: C++ code for do Python struct.pack('>I',val)
body: <p>I have Python code <code>struct.pack('&gt;I',val)</code> where <code>val</code> is any number, how can i do this in C++.</p>
  
  <p>I know <code>struct.pack</code> return byte string in Big-endian byte-order in unsigned int, if set '>I', but how i do that in C++. </p>
  
  <p>I understand that full analog of this function dosent exist in C++, but maybe i can do this with some C++ code? Thanks!</p>