Hi ppl,
im back here, but now with an array problem..
this time im doin a simple program to compare the numbers in an array n then say how are they ordered.. user must type those numbers..
#include "stdafx.h"
#include <iostream>
using namespace std;
void comparison (int number[]);
void order (int number[]);
void typing (int num);
int main(int argc, char* argv[])
{
int number [5], num;
typing (num);
order (number);
return 0;
}
void comparison (int number[5])
{
int i, j;
if (number[i] > number[j])
cout << " Elements are ordered strictly diminishing";
else if (number[i] < number[j])
cout << " Elements are ordered Strictly increasing";
else if (number[i] = number[j])
cout << " All elements are equal";
else if (number[i] <= number[j])
cout << " Elements are ordered diminishing";
else if (number[i] >= number[j])
cout << " Elements are ordered in increasing way";
}
thing is, compiler is givin me this error:
\vectores\vectores.cpp(52) : error C2664: 'comparison' : cannot convert parameter 1 from 'int' to 'int []'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
thanks!!!
gispe!!!