Hi,
ich habe ein Frage bzgl. der Operatoren. Woher weiß ich, wann ein Operator ein unärer Postfix- Operator oder ein binärer Operator ist?
int a;
int b = 1;
int c = 1;
Bsp. a = -+b+-c
Meine Überlegung 1. Schritt b negieren dann 2. Identität -> b = -1
3. Negation von c -> c= -1
4. -1 + (-1) -> a= -2
Woher weiß ich, wann ein Operator ein binärer Operator ist und wann ein unärer?
Gruß,
Coppelius
ich habe ein Frage bzgl. der Operatoren. Woher weiß ich, wann ein Operator ein unärer Postfix- Operator oder ein binärer Operator ist?
int a;
int b = 1;
int c = 1;
Bsp. a = -+b+-c
Meine Überlegung 1. Schritt b negieren dann 2. Identität -> b = -1
3. Negation von c -> c= -1
4. -1 + (-1) -> a= -2
Woher weiß ich, wann ein Operator ein binärer Operator ist und wann ein unärer?
Gruß,
Coppelius