I need some help. I was trying to create an array of strings. I used this code:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
char Line1[20] = "Hello Wazzup??";
char Line2[20] = "Hello There!!";
char * Index[2];
Index[0] = &Line1[20];
Index[1] = &Line2[20];
cout << Index[0] << endl;
cout << Index[1] << endl;
return 0;
}
however when i compile Index[0] gives some strange ascii values and Index[1] contains &Line2... can someone tell me what i did wrong???