What does –> mean in C++? What does ++> mean in C++? What does –< mean in C++? What does ++< mean in C++? Is there a –> or ++> operator in C++? Let’s answer these questions.
Firstly, –> and ++> are not actually an operator in C++. In reality, they are two separate operators. We use — as a decrement operator and ++ as an increment operator. Thus, that means;
- –> is — and > operators. That means it is the code that increments x then compares the original value using the > operator.
- ++> is ++ and > operators. That means the code decrements x then compares the original value using the > operator.
in the same way the –< and ++< are combined operators in C++. We can also answer the questions about –< and ++< operators as below.
- –< is — and < operators. That means it is the code that decrements x then compares the original value using the < operator.
- ++< is ++ and < operators. That means the code decrements x then compares the original value using the < operator.
Generally, these types of questions arise when users encounter these symbols in C++ code. but once you’ve become familiar with these symbols, it will be simple to use them in building C++ applications in the C++ IDE. These are mostly seen in do-while()
operations and other comparison or logic operations.
Table of Contents
Is there an example of using –> in C++?
For example,
this code can be explained well as below,
Is there an example of how to use ++> in C++?
For the ++> example,
can be explained well as below,
Is there an example of how the –< works in C++?
Generally these kind of questions comes when users see these symbols in C++ codes. These are mostly see in do while() operations. For example,
this code can be explained as below
Is there a C++ example of how to use the ++<
For the ++< example,
can be explained as below,
What other examples of using the –> operator?
Sometimes we use –> in texts to describe menus or Object Oriented things, for example,
- We use Project–>Options menu to setup options of the project.
Note that “–>” can be used in code inside reminders or explanations to remind something, for example,
means that x points a or x refers to a etc. Which is probably written to remind the explanation about x and a.
Consequently, there no operations like –>, ++<, –<, ++<. They are combinations of two operations in C++ 🙂
C++ Builder is the easiest and fastest C and C++ IDE for building simple or professional applications on the Windows, MacOS, iOS & Android operating systems. It is also easy for beginners to learn with its wide range of samples, tutorials, help files, and LSP support for code. RAD Studio’s C++ Builder version comes with the award-winning VCL framework for high-performance native Windows apps and the powerful FireMonkey (FMX) framework for cross-platform UIs.
There is a free C++ Builder Community Edition for students, beginners, and startups; it can be downloaded from here. For professional developers, there are Professional, Architect, or Enterprise versions of C++ Builder and there is a trial version you can download from here.