Changing the size of a table

closed account (N7f36Up4)
Hi!

I'd like to change the size of a table.
For example when asked "How many rows you wanna make?"
You can choose max 10 rows eq.

When I´m inputting numbers for example

printf("How many rows wanna make?");
scanf("%d",k);
while(i<k)
scanf("%d",chart);

This does not work. Any tips?
You have to use dynamic arrays [tables]. Look here:
http://www.fredosaurus.com/notes-cpp/newdelete/50dynamalloc.html
Last edited on
If you're using c++, use a vector.
Topic archived. No new replies allowed.