if it contains quote it cuts it out, then i am stuck on part when i just enter in a problemset without a quote or single quote. Then it doesn't gather numbers correctly but stores the entire string
int main()
{
cout <<"enter the problemset and number""\n";
//problems represents name and numbers
string problems , probtitle;
string xx;
bool x=true;
char quote;
string str1, str2;
string begin;
//gather name
if(cin.peek()=='"' || cin.peek() == '\'')
{
cin >>quote;
getline(cin,problems,quote);
}
else
{
getline(cin,problems);
}
cout<<problems;
//gather problem numbers
while(x==true)
{
if(cin.peek()=='0'||cin.peek()=='1'||cin.peek()=='2'||cin.peek()=='3'||cin.peek()=='4'||cin.peek()=='5'
||cin.peek()=='6'||cin.peek()=='7'||cin.peek()=='8'||cin.peek()=='9'||cin.peek()==','||cin.peek()=='-')
{
getline(cin,problems);
}
else
{
getline(cin,xx);
if(xx.compare("\n"))
{
x=false;
}
}
}
cout<<problems;