Created
June 11, 2015 17:32
-
-
Save minorsecond/f754ae0380da7922e0cd to your computer and use it in GitHub Desktop.
cout/cin error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 #include <stdio.h> | |
25 //#include <iostring> | |
26 #include <time.h> | |
27 #include <stdbool.h> | |
28 #include <string.h> | |
29 #include <list> | |
30 //#include <hiberlite.h> | |
31 | |
32 char DB_NAME; | |
33 char LOGLEVEL; | |
34 time_t day_start; | |
35 time_t today; | |
36 int week_num; | |
37 bool encryption; | |
38 char const * LOGFILE; | |
39 char response; | |
40 | |
41 | |
42 bool query() | |
43 { | |
>> 44 std::cout << "Do you want more tea?"; | |
>> 45 std::cin >> response; | |
46 if (response == 'Y') //not "Y" but only one 'Y' | |
47 { | |
48 return true; | |
49 } | |
50 else if (response == 'N') | |
51 { | |
52 return false; | |
53 } | |
54 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment