Код: Выделить всё
std::pair isGreaterOrEqual(int* firstNum, int* secondNum, int firstCapacity, int secondCapacity, bool isFirstNumNegative, bool isSecondNumNegative) {
std::pair greaterNumInfo;
if (firstCapacity = secondCapacity) {
for (int i = 0; i < firstCapacity; ++i) {
if (firstNum[i] > secondNum[i]) {
greaterNumInfo = std::make_pair(firstNum, isFirstNumNegative);
}
else if (firstNum[i] < secondNum[i]) {
greaterNumInfo = std::make_pair(secondNum, isSecondNumNegative);
}
}
}
if (firstCapacity > secondCapacity) {
greaterNumInfo = std::make_pair(firstNum, isFirstNumNegative);
}
else if (firstCapacity < secondCapacity) {
greaterNumInfo = std::make_pair(secondNum, isSecondNumNegative);
}
else {
greaterNumInfo = std::make_pair(NULL, 0);
}
return greaterNumInfo;
}
Код: Выделить всё
no match for ‘operator=’ (operand types are ‘std::pair’ and ‘std::pair’) 109 | greaterNumInfo = std::make_pair(NULL, 0);Подробнее здесь: https://stackoverflow.com/questions/798 ... t-bool-and