Click here to Skip to main content
15,037,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
QuestionHow to verify apt install (application file ) executable installation ? Pin
Member 1496877127-Jun-21 5:05
MemberMember 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
MemberOtto 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
mvaMircea 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
MemberOtto Medina26-Jun-21 18:51 
AnswerRe: Accurate interpretation and evaluation of this "or condition": while ( x < 1 || x > 8 ) Pin
Aghast (nj)26-Jun-21 3:13
MemberAghast (nj)26-Jun-21 3:13 
GeneralRe: Accurate interpretation and evaluation of this "or condition": while ( x < 1 || x > 8 ) Pin
Otto Medina29-Jun-21 2:30
MemberOtto Medina29-Jun-21 2:30 
QuestionHow do I access private variable of an object ? Pin
Member 1496877116-Jun-21 3:19
MemberMember 1496877116-Jun-21 3:19 
AnswerRe: How do I access private variable of an object ? Pin
Mircea Neacsu16-Jun-21 3:23
mvaMircea Neacsu16-Jun-21 3:23 
GeneralRe: How do I access private variable of an object ? Pin
Member 1496877116-Jun-21 5:50
MemberMember 1496877116-Jun-21 5:50 
AnswerRe: How do I access private variable of an object ? Pin
Mircea Neacsu16-Jun-21 6:12
mvaMircea Neacsu16-Jun-21 6:12 
GeneralRe: How do I access private variable of an object ? Pin
David Crow16-Jun-21 6:37
MemberDavid Crow16-Jun-21 6:37 
GeneralRe: How do I access private variable of an object ? Pin
Member 1496877117-Jun-21 6:41
MemberMember 1496877117-Jun-21 6:41 
AnswerRe: How do I access private variable of an object ? Pin
Richard MacCutchan16-Jun-21 6:58
mveRichard MacCutchan16-Jun-21 6:58 
AnswerRe: How do I access private variable of an object ? Pin
RedDk16-Jun-21 7:22
MemberRedDk16-Jun-21 7:22 
AnswerRe: How do I access private variable of an object ? Pin
CPallini16-Jun-21 23:27
mveCPallini16-Jun-21 23:27 
GeneralRe: How do I access private variable of an object ? Pin
Richard MacCutchan17-Jun-21 0:35
mveRichard MacCutchan17-Jun-21 0:35 
GeneralRe: How do I access private variable of an object ? Pin
CPallini17-Jun-21 1:32
mveCPallini17-Jun-21 1:32 
GeneralRe: How do I access private variable of an object ? Pin
Member 1496877117-Jun-21 6:36
MemberMember 1496877117-Jun-21 6:36 
GeneralRe: How do I access private variable of an object ? Pin
Richard MacCutchan17-Jun-21 6:40
mveRichard MacCutchan17-Jun-21 6:40 

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.