Also, I can't do this :

Code:
char content[strlen(data)] = data;
for(int x = 0; x < strlen(data); x++)
{
cout << content[x]
x++;
}
if im reading you correctly, you are trying to:

1. create a new string the size of data
2. copy the contents of data to the new string

try replacing
Code:
char content[strlen(data)] = data;
with this:
Code:
char *content = new char[ strlen(data) ];
strcpy(content, data);
dont forget to delete content.

as for the loop, i'll leave it up to you to figure out what is wrong with it.