#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
cout <<"enter the problemset and number""\n";
//problems represents name and numbers
string problems;
string problem_name_and_numbers=problems;
string numbers;
char quote;
int total_length=problems.length();
//gather name
if(cin.peek()=='"' || cin.peek() == '\'')
{
cin >>quote;
getline(cin,problems,quote);
int problemslength=(problems.length()+1);
int difference=total_length-problemlength;
numbers=problem_name_and_numbers.substr(problemlength,difference);
}
else
{
getline(cin,problems);
int problemslength=(problems.length()+1);
int difference=total_length-problemlength;
numbers=problem_name_and_numbers.substr(problemlength,difference);
}
//gather problem numbers
return 0;
}
lotrsimp12345 37 Posting Pro in Training
lotrsimp12345 37 Posting Pro in Training
lotrsimp12345 37 Posting Pro in Training
csurfer 422 Posting Pro
lotrsimp12345 37 Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.