What does :
do in C++?
is there any difference with ? :
is it an operator?
for example in code below:
// Extracting the coefficients and exponents as numbers
int expon[21] = { 0 };
int coeff[21] = { 0 };
for (int i = 0; i < monoms; ++i)
{
int monomSize = monomStr[i].size();
for (int j = 0; j < monomSize; ++j)
{
if (monomStr[i][j] == '^')
{
expon[i] = stoi(monomStr[i].substr(j + 1, monomSize - j));
coeff[i] = stod(monomStr[i].substr(0, j));
break;
}
}
}
// Looking for the max of exponents
int maxExponent = 0;
for (int k : expon) // <---- **** this colon ****
if (k >= maxExponent) maxExponent = k;
// Generating the monomials of the null polynomial having 21ree = maxEponent
std::string newMonom[21];