initialize an array in c++
int nums[100] = {0}; // initiallize all values to 0
int nums[5] = {1,2,3,4,5};
// type name[size] = {values};
initialize an array in c++
int nums[100] = {0}; // initiallize all values to 0
int nums[5] = {1,2,3,4,5};
// type name[size] = {values};
? in cpp
e = ((a < d) ? (a++) : (a = d))
//advance if else condition
array declaration c++
int foo [5];
define in cpp
#include <iostream>
// macro definition
#define LIMIT 5
int main()
{
for (int i = 0; i < LIMIT; i++) {
std::cout << i << "\n";
}
return 0;
}
# in c++
You can use '#' sign to get exact name of an argument passed to a macro:
#define what_is(x) cerr << #x << " is " << x << endl;
int variable = 376;
what_is(variable);
// prints "variable is 376"
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