How do I get C to get a variable, as in the example below, to make N = vector.
If I'm to play N in another function and put it inside a for
, then I want to reallocate the vector value by increasing N times. And thus increasing N propositionally. To be able to insert more data into the loop
And another doubt as I pass this vector variable by referenciana function?
scanf("%i", &N);
vetor = malloc(N * sizeof(int)); //vetor de struct