SHARE
TWEET

Untitled

quantumech Apr 23rd, 2019 16 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Module.onRuntimeInitialized = function()
  2. {
  3.     // Get C++ vector
  4.     // Vector gets returned as an object with all the same attributes..
  5.     // ..as a C++ vector.
  6.     let vector = Module.returnVector();
  7.  
  8.     // Print all values of the vector (4, 5, 6)
  9.     for(let i = 0; i < vector.size(); i++)
  10.     {
  11.         console.log(vector.get(i));
  12.     }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top