I am new to programming in C and I am trying to write a program that reads in one command-line argument that is the size of an array. I get the error, Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) in Xcode.
int main(int argc, char* argv[])
int size = atoi(argv[1]);
This is a snippet of my program, in which I am using sorting functions with random values, but I need to read in the size of the array first.
Any suggestions?