??????????????

I didn't remember how to input a sentence in char variable using getch()
plzzzzzzzzzzzzzzzzzzzzzz
help me!!!
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
#include <string>

int main()
{
    std::cout << "Please input a sentence:" << std::endl;
    std::string sentence;
    std::getline(std::cin, sentence);
    std::cout << "The sentence you entered was "
              << sentence.length()
              << " characters long." << std::endl;
}
http://ideone.com/AjDtJb
Last edited on
Topic archived. No new replies allowed.