************************************************************************* scope resolution namespace_name :: member global :: name global :: qualified-name ************************************************************************* member selection object . member member selection pointer -> member subscripting pointer [ expr ] function call expr ( expr_list ) value construction type ( expr_list ) post increment lvalue ++ post decrement lvalue -- type identification typeid ( type ) run-time type identification typeid ( expr ) run-time checked conversion dynamic_cast ( expr ) compile-time checked conversion static_cast ( expr ) unchecked conversion reinterpret_cast ( expr ) const conversion const_cast ( expr ) ************************************************************************* size of objects sizeof expr size of type sizeof ( type ) pre increment ++ lvalue pre decrement -- lvalue complement ~ expr not ! expr unary minus - expr unary plus + expr address of & lvalue dereference * expr create ( allocate ) new type destroy ( deallocate ) delete pointer destroy array delete [] pointer cast ( type ) expr ************************************************************************* multiply expr * expr divide expr / expr modulo ( remainder ) expr % expr ************************************************************************* add expr + expr subtract expr - expr ************************************************************************* shift left expr << expr shift right expr >> expr ************************************************************************* less than expr < expr less than or equal expr <= expr greater than expr > expr greater than or equal expr >= expr ************************************************************************* equal expr == expr not equal expr != expr ************************************************************************* bitwise AND expr & expr ************************************************************************* bitwise inclusive OR expr | expr ************************************************************************* bitwise exclusive OR expr ^ expr ************************************************************************* logical AND expr && expr ************************************************************************* logical inclusive OR expr || expr ************************************************************************* conditional expression expr ? expr : expr ************************************************************************* simple assignment lvalue = expr multiply and assign lvalue *= expr divide and assign lvalue /= expr modulo and assign lvalue %= expr add and assign lvalue += expr subtract and assign lvalue -= expr shift left and assign lvalue <<= expr shift right and assign lvalue >>= expr AND and assign lvalue &= expr inclusive OR and assign lvalue |= expr exclusive OR and assign lvalue ^= expr ************************************************************************* throw exception throw expr ************************************************************************* sequencing expr , expr ************************************************************************* Cada caja contiene operadores de igual precedencia. Los operadores de las cajas superiores tienen mayor precedencia que los de las cajas inferiores. Por ejemplo: a+b*c significa a+(b*c) y no (a+b)*c. De manera similar *p++ significa *(p++)y no (*p)++. Los operadores unarios y asignacion son asociativos hacia la derecha, todos los demas asocian a la izquierda. Por ejemplo: a=b=c significa a=(b=c), mientras que a+b+c es igual a (a+b)+c Referencia: The C++ Programming Language - Bjarne Stroustrup