Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdlib.h>
- #include <iomanip>
- #include <string>
- #include <ctype.h>
- #include <stdio.h>
- using namespace std;
- struct sss{
- int *aaa;
- char s;
- };
- int main(){
- int i,j;
- sss *ptr = new sss[10];
- //sss *ptr ;
- //ptr -> aaa = new int[10];
- for( i = 0; i < 10 ; i++){
- ptr[i].aaa = new int[10];
- for(j = 0 ;j < 10 ;j++) {
- ptr[i].aaa[j] = 2 * i ;
- cout << ptr[i].aaa[j] << endl;
- }
- }// ptr
- delete ptr;
- getchar();
- getchar();
- return 0;
- }
Add Comment
Please, Sign In to add comment