三元运算符

int a =1,b=2;
int c;
c = a>b?a:b;

运算符优先级

可以看到.运算符是高于*运算符的

results matching ""

    No results matching ""