I have to make 2 arrays and use functions to input, output, add, and compare them but I keep getting error message: undefined reference to outputVLI(int*, int)
. I am not sure what this means or how to fix it. Any help would be appreciated
#include <iostream>
using namespace std;
const int maxDigits = 100;
void inputVLI (int vli[], int size); // Inputs the very long integers
void outputVLI (int vli[], int size); // Outputs the very long integers
void addVLI (const int vli1[], const int vli2[], int vli3[], int size1, int size2, int& size3); // Adds the very long integers together
int compVLI (const int vli1, const int vli2, int size1, int size2); // Compares the very long integers
int main()
{
int vli1[maxDigits], vli2[maxDigits], vli3[maxDigits], size1, size2, size3;
inputVLI (vli1, maxDigits); // Calls the individual functions
outputVLI (vli1, maxDigits); // |
inputVLI (vli2, maxDigits); // |
outputVLI (vli2, maxDigits); // |
/*addVLI (vli1, vli2, vli3, size1, size2, size3); // |
compVLI (vli1, vli2, size1, size2);*/ // \/
return 0;
}
void inputVLI(int vli[], int size)
{
cout << "Enter a very long integer" << endl;
cin >> vli[maxDigits];
}
void output (int vli[], int size)
{
for (int i=maxDigits; i>=0; i--)
cout << vli[i];
}
void addVLI (const int vli1[], const int vli2[], int vli3[], int size1, int size2, int& size3)
{
/*
for (int i=0; i<maxDigits; i++)
{
vli3[i]=vli1[i] + vli2[i];
cout << "The sum of the vli's is:" << vli3[i] << endl;
}
*/
}
int compVLI (const int vli1, const int vli2, int size1, int size2)
{
/*
for (int i=0; vli1[maxDigits] && vli2[maxDigits]; i++)
{
if (vli1[maxDigits] != vli2[maxDigits])
{
return (-1); // -1 is not equal
}
return (1); // 1 is equal
}
*/
}