I am experimenting with CGI in C++. I know that there are libraries which handle basic stuff, but in order to know whats going on under the hood i have been trying to parse the stdin using string datatype ---> tokenize using '= and &' then push_back into a vector. at the latter step, i am receiving segmentation fault. given below is the program where i am using cin>> to obtain user input and so on ..
using namespace std;
fgets(str,20,stdin); //20 is expect size of content from html form
Now to break this guy apart";
bufferchar = strtok(str,"&=");
cout<ok does the vector iterate ?";
ok man, next