Hi, I'm facing a problem.
I need the user to input a string, and then I have to add the string character by character to a queue so I can perform some parsing on it, I'm doing something wrong that I don't know.
I've used sizeof(), length() and strlen() built in functions for the for loop to enter the string character by character, but it keeps giving me debugging errors. I'm new to this. Hope someone can point out my coding mistakes
char* sntnc;
cout<<"Enter sentence: ";
cin>>sntnc;
int f = strlen(sntnc);
for(int g=0; g<f; g++)
{
q.add_q(sntnc[g]);
}