¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
Order of inputs and outputs. What goes where?
is cout first or cin or int etc. or is there no difference. also what is the difference between ++x and x++ difference
1 Respuesta
+ 1
There is no such thing as an "order". You use what you need, when you need it. If you need to declare a new variable, you will use data types such as int, char, string, bool etc. If you need to print something to the console, you will use std::cout, and if you need to take input from the user, you will use std::cin.
++x is a pre-increment. The value of x is incremented by one before it is used.
x++ is a post-increment. The value of x is incremented by one after it is used.