A little bit from everything, and loops and arrays again.
Today we visited three very similar problems. Dealing with 2d arrays, getting command line parameters into a 2d array, and performing other operations in a 2d array. We learned an important concept, and that is command line parameters. Instead of giving your code inputs like in a dialog, where the program asks and gets inputs, you can hand parameters over to your program by simply writing them after the program call. You just need to separate them by blanks. Unfortunately these arguments are of type char * which means we have to convert them to other types in case they represent values. Converting an argument to an int requires atoi() and an argument to a float requires atof(). Check out our examples here:lecture 9 and the code for the tictactoe.c program is here:tictactoe . Next time I will go into dynamic memory allocations and pointers, which means I assume from now on that you are familiar with arrays and how to use loops.