So i want to get text after a point. I get text form a txt file like this
string filename = "C:/Users/Tim/Desktop/Folder/Documents/Programing/C++/New Folder/Areas/StartingRoom.txt";
ifstream myfile( filename.c_str() );
getline(myfile, firstline);
and check the first letter liek this
if (command[0] == '/'))
but after / i want to get the text. Then loop through variable until that text is found.
Ok thanks,. I tried this and it worked
size_t found;
cout << "Splitting: " << str << endl;
found=str.find_last_of("Get");
cout << " file: " << str.substr(found+1) << endl;
but i tried typing GetHello
and it returned GetH always not Get then Hello
I know its getting after a specific part but im not sure where
ok the problem i had is i want to get everything after and it returns the point that get starts. And the command would be GetSomething but it would just retun 0 because thats were Get starts.