#include <stdio.h>

typedef struct _vector {
	int num;
	int a[128];
} vector;

int main(){
    vector b={0};
    int i, exit=0;
	b.num=0;
    vector *pb=&b;

	for(i=0; i<128 && !exit; i++){
		char c;
		printf("Inserire un elemento: ");
		scanf("%d", &(b.a[i]));
		b.num=b.num+1;
		scanf("%c", &c);
		printf("Si vuole inserire un altro elemento? [s/n]");
		scanf("%c", &c);
		if (c!='s') exit=1;
	}

    printf("len: %d\n", (*pb).num);
    printf("len: %d\n", pb->num);

	for(i=0; i<b.num; i++)
		printf("%d ", b.a[i]);
	printf("\n");
}

