I am trying to create an
empty vector inside a loop and want to add an element to the vector each time something
is read in to that loop.
#include
#include
using namespace
std;
int main()
{
std::vector
myVector();
float x;
while(cin >>
x)
myVector.insert(x);
return
0;
}
but
this is giving me error messages.
No comments:
Post a Comment