Hi ... I'm new to c++ programming and i'm trying to parse a large char* which contains something like this :
Header 1
Header 2
Login name
a=1234123
b=23423
c=23432
a=qwerty
and i need to save them into variables (array of strings maybe? )
Here is my try ... I dont know how to take all the chars and put then on the string ... also if you think of a better way of doing this it would be great !!! thank you
Code:
void parsing(char* reply){
int j=0;
for(int i=0;i<reply.length();i++){
int next=i+1;
int fwd=i+2;
if( (reply[i]=='\n')&&(reply[fwd]=='=') ){
parsedhead[j]=reply[next];
parseddata[j]= //HELP HERE :(
j++;
}
}
}
both arrays i have then already declared