I'm talking about your for loop:
for(counter=0;counter<=10;counter++)
you are allocating place for 10 integer pointers, but then you try to assign 11 pointers something.
@TheLiam:
Of course he has an array. He allocates the memory for the array at runtime and assigns some value to the array. It's described here in detail:
http://c-faq.com/aryptr/dynmuldimary.htmlEdit: Second wish: Please build variable argument lists into the compiler.