My trouble causing lines are maked within the code.
Though I don't show it index and index2 have been initialized. The lines that I've marked are giving me the error C2059: syntax error : '='. I have no clue what that means. I've tried removing the *, but that only gives me a different error. It proably dosen't help that Im not good with pointers.
Helps appreciated, thanks.
Code:
#include<iostream>
#include<string>
using namespace std;
void main()
{
string* head;
string* tail;
head = new string;
tail = new string;
string reString;
cout<<"Enter a some content you want reversed: ";
getline(cin,reString);
head* = reString[index];//problem here
tail* = reString[index2];// and here
Helps appreciated, thanks.
Comment