int main()
{
int one[ 6 ] = { 1, 2, 3, 4, 5, 6 };
int two[ 6 ];
two = one;
}
That just won't work. You can't copy an entire array with an assignment statement.
You can copy the address of an array with an assignment, since an address is a pointer:
1 2 3 4 5 6 7 8
int main()
{
int one[ 6 ] = { 1, 2, 3, 4, 5, 6 };
int *two;
two = one;
// which is the same as
two = &(one[ 0 ]);
}
Since two is now a pointer (not an array) you can make it point to anything, including the first element in an array.
Or, you can copy the array:
1 2 3 4 5 6
int main()
{
int one[ 6 ] = { 1, 2, 3, 4, 5, 6 };
int two[ 6 ];
memcpy( two, one, 6 * sizeof( int ) );
}
Hope this helps.
Oh, I forgot to mention that all that TEXT() and TCHAR stuff is <windows.h> boilerplate to make things work if you ever compile for Unicode. You are just using ASCII or ISO-8859-1 so it shouldn't make a difference as long as you don't turn the Unicode compile flag on.