hello,
this code will compare a single array location with the value returned from the fun() function.
i would like to compare the fun() value to all of the locations in the array.
any ideas?
~~~~~~~~~~~~~~~~~~~~~~~code~~~~~~~~~~~~~~~~~
/*code to test the access of data from text files and DB conversion*/
/*files*/
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
#include <stdio.h>
int fun(void);
void db_access(void)
{
system ("clear");
cout<<"Start of Database\n\n";
char ch;
int a[12];
int k;
int i;
for (i=0; i<12; i++) a[i] = i;
cout<<"\n\nEnd of Database\n";
printf("XXXXXX: %i\n", a[0]);
printf("XXXXXX: %i\n", a[1]);
printf("XXXXXX: %i\n", a[2]);
printf("XXXXXX: %i\n", a[3]);
printf("XXXXXX: %i\n", a[4]);
printf("XXXXXX: %i\n", a[5]);
printf("XXXXXX: %i\n", a[6]);
printf("XXXXXX: %i\n", a[7]);
printf("XXXXXX: %i\n", a[8]);
printf("XXXXXX: %i\n", a[9]);
printf("XXXXXX: %i\n", a[10]);
printf("XXXXXX: %i\n", a[11]);
k = fun();
cout<<fun()<<"\n";
cout<<k<<"\n";
if(a[8]<k)cout<<"Sucess\n";
cout<<"Press any key to continue.\n";
cin.get();
char x;
}
int fun()
{
int k;
k=9+4;
return k;
}
int main()
{
system("clear");
fun();
db_access();
return 0;
}
~~~~~~~~~~~~~~~~~~~~code~~~~~~~~~~~~~~~~~~~~~
thanks
M.R.