Click here to Skip to main content
15,895,536 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Base types and pointer arrays Pin
CPallini5-Jul-21 21:03
mveCPallini5-Jul-21 21:03 
GeneralRe: Base types and pointer arrays Pin
Richard Andrew x646-Jul-21 3:57
professionalRichard Andrew x646-Jul-21 3:57 
AnswerRe: Base types and pointer arrays Pin
jschell17-Jul-21 10:09
jschell17-Jul-21 10:09 
GeneralRe: Base types and pointer arrays Pin
Richard Andrew x6417-Jul-21 13:39
professionalRichard Andrew x6417-Jul-21 13:39 
QuestionLiteral for a short Pin
Richard Andrew x645-Jul-21 11:47
professionalRichard Andrew x645-Jul-21 11:47 
AnswerRe: Literal for a short Pin
Greg Utas5-Jul-21 12:24
professionalGreg Utas5-Jul-21 12:24 
GeneralRe: Literal for a short Pin
Richard Andrew x645-Jul-21 12:55
professionalRichard Andrew x645-Jul-21 12:55 
QuestionDebug Application from Service Pin
Richard Andrew x643-Jul-21 14:16
professionalRichard Andrew x643-Jul-21 14:16 
AnswerRe: Debug Application from Service Pin
Daniel Pfeffer3-Jul-21 17:24
professionalDaniel Pfeffer3-Jul-21 17:24 
AnswerRe: Debug Application from Service Pin
Richard MacCutchan3-Jul-21 21:11
mveRichard MacCutchan3-Jul-21 21:11 
AnswerRe: Debug Application from Service Pin
Joe Woodbury4-Jul-21 17:14
professionalJoe Woodbury4-Jul-21 17:14 
GeneralRe: Debug Application from Service Pin
Richard Andrew x645-Jul-21 6:25
professionalRichard Andrew x645-Jul-21 6:25 
QuestionMultiple view ports in single window using opengl and c++ Pin
Member 107421151-Jul-21 23:15
Member 107421151-Jul-21 23:15 
SuggestionRe: Multiple view ports in single window using opengl and c++ Pin
CHill601-Jul-21 23:16
mveCHill601-Jul-21 23:16 
AnswerRe: Multiple view ports in single window using opengl and c++ Pin
Richard MacCutchan1-Jul-21 23:59
mveRichard MacCutchan1-Jul-21 23:59 
QuestionNative VS Debugger Question - SOLVED Pin
Richard Andrew x6428-Jun-21 10:39
professionalRichard Andrew x6428-Jun-21 10:39 
AnswerRe: Native VS Debugger Question Pin
Richard MacCutchan28-Jun-21 21:03
mveRichard MacCutchan28-Jun-21 21:03 
GeneralRe: Native VS Debugger Question Pin
Richard Andrew x6429-Jun-21 10:07
professionalRichard Andrew x6429-Jun-21 10:07 
GeneralRe: Native VS Debugger Question Pin
Richard MacCutchan29-Jun-21 10:16
mveRichard MacCutchan29-Jun-21 10:16 
QuestionMessage Closed Pin
27-Jun-21 5:05
Member 1496877127-Jun-21 5:05 
AnswerRe: How to verify apt install (application file ) executable installation ? Pin
Richard MacCutchan27-Jun-21 5:26
mveRichard MacCutchan27-Jun-21 5:26 
AnswerRe: How to verify apt install (application file ) executable installation ? Pin
k505427-Jun-21 5:56
mvek505427-Jun-21 5:56 
QuestionAccurate interpretation and evaluation of this "or condition": while ( x < 1 || x > 8 ) Pin
Otto Medina25-Jun-21 21:36
Otto Medina25-Jun-21 21:36 
My doubt is about the basic theory of "or logical operator". Especifically, logical OR returns true only if either one operand is true.

For instance, in this OR expression (x<O || x> 8) using x=5 when I evalute the 2 operands, I interpret it as both of them are false.

But I have an example that does not fit wiht it rule. On the contrary the expression works as range between 0 and 8, both included. Following the code:


#include <stdio.h>

int main(void)
{
    int x ; //This is the variable for being evaluated

    do
    {
    printf("Imput a figure between 1 y 8: ");
    scanf("%i", &x);

    }
    while ( x < 1 ||  x > 8 );  // Why this expression write in this way determinate the range???

    {
        printf("Your imput was ::: %d ",x);
        printf("\n");

     }
        printf("\n");

}



I really appreciate any helpo in order to clarify my doubt

In advance, thank you very much. Otto

AnswerRe: Accurate interpretation and evaluation of this "or condition": while ( x < 1 || x > 8 ) Pin
Mircea Neacsu26-Jun-21 1:25
Mircea Neacsu26-Jun-21 1:25 
GeneralRe: Accurate interpretation and evaluation of this "or condition": while ( x < 1 || x > 8 ) Pin
Otto Medina26-Jun-21 18:51
Otto Medina26-Jun-21 18:51 

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.