my code is given below...my problem is just about the termination of input when i enter blank or simply press the return key...i appreciate any help..thanks alot!!
include
include
include
using namespace std;
main()
{
int input;
vectorv;
while(scanf ( "%d", &input ) == 1 )
{
//cin>>input;
if(!input)
break;
else
v.push_back(input);
}
vector<int>::iterator i;
for(i=v.begin();i<v.end();i++)
{
if(*i!=42)
cout<<*i<<endl;
else break;
}
}