Need assistance adding "Numbers" to a string loop without hardcoding

Sorry but I've hit a wall in my thoughts. Tends to be made out of diamond so firing explosive seems to not be working.

My Program:
1
2
3
4
5
6
7
8
9
10
cout<<"\nPlease enter the quantity of your Affirmation points."<<endl<<"<enter> ";
    cin>>number;
    for (int ctr=1; ctr<=number; ctr++) {
        cout<<"\nPlease Enter affirmation point "<<ctr<<endl<<" <enter> ";
        std::cin >> input;
        std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
        affirmation=affirmation+"\n" +input; //Problem here!! I already got it to add a new line every time
// but how can I add a string number that increases by 1 every time as well?

    }

Before you ask, Affirmation has already been declared as well as input as a String. (Can't post the whole program, or I'd rather not because it could always be copied by someone within this site)

I want it so it inters the input in both a new line and it goes like:
1. Input
2. Input
3. Input
But I can't figure out how to get the string to fire go from 1 to 2 to 3. I don't want to hard code it either since the number of times the loop can be executed is infinitely large.

I was thinking along the lines of:
- converting the x value into a string value every single time it loops while not affecting the original x value
- trying to get so I can get a string value of point#"x" where the program creates the string values
- giving up.
Last edited on
Sorry ahead of time, I'm COMPLETELY new to this site so if I've broken any rules or regulations please tell me! Or how I can state my thoughts in a better fashion.
Topic archived. No new replies allowed.