#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;
}

it doesn't like problems.length

problemlength wasn't declared in this scope

Are you asking a question or answering your own question ???

i got it to work. So i don't need help anymore.

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.