c++ classes

N

nmrox

Hi all,
could some one tell me what are these errors? How I fix it?

la-ques2.cpp: In function ‘int main()’:
la-ques2.cpp:4: error: request for member ‘InputData’ in ‘al1’, which
is of non-class type ‘arrayList ()()’
la-ques2.cpp:5: error: request for member ‘FindMaximum’ in ‘al1’,
which is of non-class type ‘arrayList ()()’
la-ques2.cpp:6: error: request for member ‘Findminimum’ in ‘al1’,
which is of non-class type ‘arrayList ()()’
la-ques2.cpp:7: error: request for member ‘print’ in ‘al1’, which is
of non-class type ‘arrayList ()()’

my code of la-ques2.cpp is looks like here.
---------------------------------------------------------
#include "arrayList.h"
int main(){
arrayList al1();
al1.InputData();
al1.FindMaximum();
al1.Findminimum();
al1.print();


return 0;
}
--------------------------------------------------------
 
R

rep_movsd

The compiler parses :

arrayList al1();

as a declaration of a function al1 that takes no parameters and
returns an arrayList

You need to write :

arrayList al1;


instead...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,266
Latest member
DavidaAlla

Latest Threads

Top