Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1.  
  2. #include "stdafx.h"
  3. #include <iostream>
  4. #include <cstdint>
  5.  
  6. using namespace std;
  7.  
  8. uint32_t array1ui32 [] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  9. uint32_t array1Elementui32 = sizeof(array1ui32) / sizeof(array1ui32[0]);
  10.  
  11. uint32_t array2ui32 [] = { 111, 222, 333, 444, 555, 666, 777, 888, 999, 1000 };
  12. uint32_t array2Elementui32 = sizeof(array2ui32) / sizeof(array2ui32[0]);
  13.  
  14. extern "C" { uint32_t AverageFunc(uint32_t, uint32_t[]); }
  15.  
  16. int _tmain(int argc, _TCHAR* argv []) {
  17.  
  18. cout << "Array 1 Average : " << AverageFunc(array1Elementui32, array1ui32) << endl;
  19. cout << "Array 2 Average : " << AverageFunc(array2Elementui32, array2ui32) << endl;
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement