Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
The subtraction operator (-) subtracts the second operand from the first. Both operands can be either integral or floating types, or one operand can be a pointer and the other an integer.
For more information, see logical-NOT, addition, and one's complement.
Example
In the following example, integer nNumB is subtracted from integer nNumA giving result nNumC:
// Example of the subtraction operator
int nNumA=8, nNumB=2, nNumC;
nNumC = nNumA - nNumB; // nNumC is now 6