vector problem2
> Why my input capital letters,the output isn't a lower litter ?
I would like you to rephrase the question.
Last edited on
Maybe even rephrase it :)
my program is
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 28
|
#include<iostream>
#include<vector>
#include<string>
#include<cctype>
#include <cstdlib>
#include <fstream>
#include <stdio.h>
using namespace std;
int main ()
{
vector<string> s;
string word;
cout << "Enter your words, EOF to quit: " << endl;
while (cin >> word)
{ s.push_back (word);
if (word.length () == 4 || word.length () == 5)
{
for (size_t i = 0; i < word.size (); ++i)
word[i] = tolower (word[i]);
}
}
for (size_t i = 0; i < s.size(); ++i)
cout << s[i] << endl;;
system ("pause");
return 0;
}
|
what is wrong? why my output isn't a lower litter ?
Have you already run out of words to describe your problem?
I think you meant guys.
Topic archived. No new replies allowed.