When I try to create a second array, I get the following error(s):From the following code:Test.cpp: In function `int main()':
Test.cpp:10: invalid initializerWhy?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; }
Moreover,
What I am trying to do is:Or is there a better way?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; }



LinkBack URL
About LinkBacks


