Answer the question
In order to leave comments, you need to log in
What causes the ld returned 1 exit status error?
When I try to compile the code, I get the error ld returned 1 exit status. Compilation problems occur during the passing of the last argument function. How to fix it?
#include<iostream>
#include <cstdlib>
#include <ctime>
#include <iomanip>
using namespace std;
void inputArray(int B[24][14], int i, int j) {
srand(time(0));
for (i = 0; i < 24; i++) {
for (j = 0; j < 14; j++) {
B[i][j] = (rand( )%100 - 50);
}
};
}
void printArray(int B[24][14], int i, int j) {
for (i = 0; i < 24; i++) {
for (j = 0; j < 14; j++) {
cout<<setw(5)<<B[i][j];
}
cout<<endl;
}
}
void processingArray(int *B, int k);
int main() {
setlocale(LC_ALL, "Russian");
int B[24][14], i=0, j=0;
inputArray(B, i, j);
printArray(B, i, j);
cout<<endl<<endl;
processingArray(B[i], 14);
}
Answer the question
In order to leave comments, you need to log in
Above is written undefined reference to 'processingArray(int*, int)'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question