#Im trying to use a get(line) read user input and spit a threshold depending on the last number.

6 messages · Page 1 of 1 (latest)

hard slateBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

restive aurora
#

ok I have updated my code

#

#include <iostream>
#include <vector>
using namespace std;

int main()

{

int a;
vector<int> userInts;

while (cin >> a){

userInts.push_back(a);

}
for(auto &p : userInts)
{
cout<<p<<",";
}
cout<<endl;

return 0;
}

#

right here is only reading input and spitting it back out with "," in a vector

#

I really need help making the input a string

#

so I can call back to it and locate the last number and make it the threshold and determine what gets outputted