Advertisement
Guest User

Untitled

a guest
May 26th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <experimental/filesystem>
  4.  
  5. using namespace std;
  6.  
  7. extern "C" int __fastcall Function1(unsigned int, unsigned __int16*, unsigned __int16*);
  8.  
  9. int main()
  10. {
  11. unsigned __int16 a_size;
  12. cout << "Enter size: " << endl;
  13. cin >> a_size;
  14. unsigned __int16* a = new unsigned __int16[a_size];
  15. unsigned __int16* b = new unsigned __int16[1 << 16];
  16. cout << "Enter elements: " << endl;
  17. int el;
  18. for (int i = 0; i < a_size; i++)
  19. {
  20. cin >> el;
  21. a[i] = el;
  22. }
  23.  
  24. cout << "Your array: " << endl;
  25. for (int i = 0; i < a_size; i++)
  26. {
  27. cout << a[i] << ' ';
  28. }
  29. cout << endl;
  30. int result;
  31. result = Function1(a_size, a, b);
  32.  
  33. cout <<"Number of different elements: " << result << endl;
  34. system("pause");
  35. return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement