Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::ifstream textFile ("D:\\1.txt");
- std::string textBuffer;
- int k, size = 0;
- int numberOfWordsLowercase = 0;
- int numberOfSpaces = 0;
- while (std::getline(textFile, textBuffer))
- {
- ++size;
- int len = textBuffer.length();
- //if (!isupper(textBuffer[0])) || if (std::find textBuffer[0] != '\r')
- // ++numberOfSpaces;
- for (int k = 0; k<len; k++) {
- if (textBuffer[k] == ' ') {
- if (!isupper(textBuffer[k+1])) ++numberOfSpaces;
- }
- }
- }
- textFile.close ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement