#include<iostream.h>
#include<conio.h>
class suitcase
{
int sno[20];
long double amount[20];
public:
suitcase();
void print()
{
int i;
for(i=0;i<=19;i++)
cout<<amount[i]<<'\n';
}
};
suitcase::suitcase()
{
amount[20]={0.25,1.0,10.0,100.0,250.0,500.0,1000.0,5000.0,10000.0,50000.0,
100000.0,200000.0,300000.0,400000.0,500000.0,1000000.0,
2500000.0,5000000.0,7500000.0,10000000.0};
}
void main()
{
suitcase s1;
s1.print();
}
When I run this program, I get an error :-
expression syntax in function suitcase::suitcase()
Why am I getting an error? What am I doing wrong?
I know its a very stupid error, but can't spot which it is.
Kindly help me.
Thanks in advance.