Guest User

Untitled

a guest
Jan 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdlib.h>
  3. #include <iomanip>
  4. #include <string>
  5. #include <ctype.h>
  6. #include <stdio.h>
  7.  
  8. using namespace std;
  9.  
  10. struct sss{
  11.     int *aaa;
  12.     char s;
  13.   };
  14.  
  15.  
  16.  
  17. int main(){
  18.     int i,j;
  19.     sss *ptr = new sss[10];
  20.  
  21.   //sss *ptr ;
  22.   //ptr ->  aaa = new int[10];
  23.  
  24.   for( i = 0; i < 10 ; i++){
  25.       ptr[i].aaa = new int[10];
  26.       for(j = 0 ;j < 10 ;j++) {
  27.           ptr[i].aaa[j] = 2 * i ;
  28.           cout << ptr[i].aaa[j] << endl;
  29.       }
  30.   }// ptr
  31.  
  32.   delete ptr;
  33.  
  34.     getchar();
  35.     getchar();
  36.     return 0;
  37. }
Add Comment
Please, Sign In to add comment