Histogram issues

Hello I've written a program that makes the user input positive numbers, and a negative number. The negative number tells the program that the user has stopped inputting numbers. Now my problem is that the numbers the user inputed haver to be turned into *. For example if the user inputs 1, 2 ,3, -1 the output would be
*
**
***
I've written something similar to it now instead of *, it just outputs numbers again. Can anyone help me with this. Thank you in advanced. Here is my code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include <vector>
using namespace std;

int main( )
{
    vector<int> v;
    cout << "Enter a list of positive numbers.\n"
         << "Place a negative number at the end.\n";

    int next;
    cin >> next;
    while (next > 0)
    {
        v.push_back(next);
        cout << next << endl;
        cin >> next;
    }

    cout << "You entered:\n";
    for (unsigned int i = 0; i < v.size( ); i++)
        cout << v[i] << "\n";
    cout << endl;
    
    system("pause");
    return 0;
}
Output one asterisk std::cout << '*';. Repeat it n times.

To read the input while( (cin>>n) and (n>=0) )
Topic archived. No new replies allowed.