|| in C++
|| the or operator in C
&& the and operaor
|| in C++
|| the or operator in C
&& the and operaor
operators c++
// Operators are simply functions but cooler
// E.g: The + sign is an operator, [] is an operator, you get the point
// Which is even cooler is you can overload them
// Means you can change their behavior
// I can make + actually decrement (dont do this)
int operator+(int other){
return *this - other;
}
// And make - return always 0
int operator-(int other){ return 0; }
// (THIS IS ANOTHER PROGRAM SO + AND - ARE NOT BROKEN ANYMORE)
#include <iostream>
#include <string>
#include <stdio.h>
#include <vector>
// And then im gonna make a class
class UselessClass{
private:
// And have a vector of integers with a bunch of numbers
std::vector<int> numbers = {1, 2, 3};
public:
// Then im gonna make the array index operator return the int at the index but with 5 added to the int
int operator[](int index){
return this->numbers[index] + 5;
}
};
int main(){
// And then
UselessClass a;
std::cout << a[0] << "n";
// It will print 6
}
operand-- c++
++x;
x+=1;
x=x+1;
or operator c++
section .text
global main
extern printf
main:
mov ebx,10 ; moving the intial time to ebx
loop: push ebx ; value of first parameter
push message ; value of second parameter
call printf ; to outpur the result
dec ebx ; decrementing the value stored in ebx by 1
jnz loop ; if not equal to zero then a go to loop would be triggered
add esp,80 ;clearing the stack
ret
message db "Value = %d",10,0
Here's the solution to your question, please provide it a 100% rating. Thanks for asking and happy learning!!
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us