NoMatchFound

Array of structs: dinamic allocation

Dec 13th, 2011
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. #include "dinalloc.h"
  4.  
  5. using namespace std;
  6.  
  7. int main()  {
  8.     int n;
  9.     cout << "Put a number for the array: ";
  10.     cin >> n;
  11.     hi *vet = new hi[n]; // dinamic allocation of an array of structures
  12.  
  13.     loadHistogram(vet, n);
  14.     printHistogram(vet, n);
  15.  
  16.     delete []vet;
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment