Click here to Skip to main content
15,914,074 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to prevent "Screen Capture" ? Pin
jajamal31-Jan-04 1:29
jajamal31-Jan-04 1:29 
GeneralRe: How to prevent "Screen Capture" ? Pin
Diddy31-Jan-04 9:37
Diddy31-Jan-04 9:37 
GeneralCString question Pin
mr200327-Jan-04 7:43
mr200327-Jan-04 7:43 
GeneralRe: CString question Pin
Mukkie27-Jan-04 7:48
Mukkie27-Jan-04 7:48 
GeneralRe: CString question Pin
Antti Keskinen27-Jan-04 7:52
Antti Keskinen27-Jan-04 7:52 
GeneralRe: CString question Pin
Carlos Antollini27-Jan-04 8:06
Carlos Antollini27-Jan-04 8:06 
GeneralRe: CString question Pin
Antti Keskinen27-Jan-04 9:19
Antti Keskinen27-Jan-04 9:19 
Generalwhile loop problem Pin
CarteBlanche27-Jan-04 7:28
CarteBlanche27-Jan-04 7:28 
Hello, I'm new to this forum/website/ and C++! Smile | :)

The problem I'm having is that my loop repeats even when I enter a value of 'Y', 'y', 'N', or 'n'. I want it to break after one of these values have been entered and return it. Please advise.

Even if I enter Y, N, y, or n it still does the while loop. I'm trying to get it to repeat the loop ONLY if the value of the variable isn't one of the above. Please advise.

char searchAgain()
{
char rSearch;
do
{
cout << "Search again? (Y/N): ";
cin >> rSearch;
}while (rSearch != 'Y' || rSearch != 'y' || rSearch != 'N' || rSearch != 'n');


return rSearch;
}

"Criticism comes easier than craftsmanship" - Zeuxis
GeneralRe: while loop problem Pin
b_girl27-Jan-04 7:34
b_girl27-Jan-04 7:34 
GeneralRe: while loop problem Pin
CarteBlanche27-Jan-04 7:37
CarteBlanche27-Jan-04 7:37 
GeneralRe: while loop problem Pin
Antti Keskinen27-Jan-04 7:43
Antti Keskinen27-Jan-04 7:43 
GeneralRe: while loop problem Pin
CarteBlanche27-Jan-04 7:56
CarteBlanche27-Jan-04 7:56 
GeneralCount the number of characters in a CString Pin
mr200327-Jan-04 7:13
mr200327-Jan-04 7:13 
GeneralRe: Count the number of characters in a CString Pin
monrobot1327-Jan-04 7:23
monrobot1327-Jan-04 7:23 
GeneralRe: Count the number of characters in a CString Pin
Mukkie27-Jan-04 7:36
Mukkie27-Jan-04 7:36 
GeneralRe: Count the number of characters in a CString Pin
toxcct27-Jan-04 8:51
toxcct27-Jan-04 8:51 
GeneralRe: Count the number of characters in a CString Pin
mr200327-Jan-04 9:18
mr200327-Jan-04 9:18 
GeneralRe: Count the number of characters in a CString Pin
toxcct27-Jan-04 20:27
toxcct27-Jan-04 20:27 
GeneralRe: Count the number of characters in a CString Pin
Mukkie27-Jan-04 10:19
Mukkie27-Jan-04 10:19 
GeneralWord API - Insert page break after every hyperlink problem Pin
leemidgley27-Jan-04 7:05
leemidgley27-Jan-04 7:05 
Questiona CArray of structures containing other CArrays? Pin
b_girl27-Jan-04 6:26
b_girl27-Jan-04 6:26 
AnswerRe: a CArray of structures containing other CArrays? Pin
Diddy27-Jan-04 6:34
Diddy27-Jan-04 6:34 
GeneralRe: a CArray of structures containing other CArrays? Pin
b_girl27-Jan-04 6:49
b_girl27-Jan-04 6:49 
GeneralRe: a CArray of structures containing other CArrays? Pin
b_girl27-Jan-04 7:31
b_girl27-Jan-04 7:31 
GeneralRe: a CArray of structures containing other CArrays? Pin
Antti Keskinen27-Jan-04 7:57
Antti Keskinen27-Jan-04 7:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.