newbie problems with pointers arrays and functions.

This is a discussion on newbie problems with pointers arrays and functions. within the C++ Programming forums, part of the General Programming Boards category; im trying to create a simple program that creates an array; tells every element of the array to become the ...

newbie problems with pointers arrays and functions.

im trying to create a simple program that creates an array; tells every element of the array to become the letter 'a'. and then print the full array. As you will soon find out im a newbie, and the line of code i typed makes somewhat of sense to me. I did some research and tried describing the pointers in different ways but none have worked. if someone could shed dome light id be delighted.

assuming strings are more for word inputs and character are more leaning towards single character inputs, im wanting to use character. what im trying to do is make a Tic Tac Toe game, and i know this might not be the best approach, but im trying to do it however i know best, and after ill figure out the correct method.

btw: thank you laser light. you've been more help then i could ask. Once i get going you wont here from me as much on the boards. except hopefully maybe helping others.

When passed as an argument, an array decays to a pointer to its first element. So tTable is an array, but it also works like a pointer, and in the functions pTable really is a pointer, yet works like an array.

tTable is an array (a two dimensional array in this case). char pTable[3][3] is the declaration of an array that is the parameter for the function. Since tTable and pTable have the same type, you just pass tTable directly to the function. There's no need to think about them in terms of pointers or addresses.