When I try to create a second array, I get the following error(s):
Test.cpp: In function `int main()':
Test.cpp:10: invalid initializer
From the following code:
Code:
int main ( void )
{
char * ArrayOne[2] = { "One - One", "One - Two" };
char * ArrayTwo[2] = ( "Two - One", "Two - Two" );
int Counter;
for ( Counter = 0; Counter < 2; Counter ++ )
{
cout << ArrayOne[Counter] << endl << ArrayTwo[Counter] << endl;
}
return 0;
}
Why?
Moreover,
What I am trying to do is:
Code:
int main ( void )
{
char * ArrayOne[2] = { "C:\\Windows\\Network.txt", "C:\\Windows\\Printers.txt" };
char * ArrayTwo[2] = ( "C:\\Windows\\Desktop\\Netowkr.txt", "C:\\Windows\\Printers.txt" );
char * ArrayThree[2] = ( "Network documentation", "Printers documentation" );
int Counter;
for ( Counter = 0; Counter < 2; Counter ++ )
{
cout << FileCopy ( ArrayOne[Counter], ArrayTwo[Counter], ArrayThree[Counter] << endl;
}
return 0;
}
Or is there a better way?