Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
C6323
Collapse the table of content
Expand the table of content

C6323

warning C6323 - use of arithmetic operator on Boolean type(s)

This warning occurs if arithmetic operators are used on Boolean data types. Use of incorrect operator might yield incorrect results. It also indicates that the programmer's intent is not reflected in the code.

The following code generates this warning:

int test(bool a, bool b)
{
    int c = a + b;     //C6323
    return c;
}

To correct this warning, use correct data type and operator.

int test(int a, int b)
{
    int c = a + b;     
    return c;
}
Show:
© 2015 Microsoft