HOW TO FIX illegal use of pointer error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lokesh007
    New Member
    • Nov 2017
    • 1

    HOW TO FIX illegal use of pointer error

    #include<iostre am.h>
    #include<conio. h>
    void main()
    {
    double emp_sal[50];
    int cout=0,no_of_em ployees;
    clrscr();
    cout<<"enter the no.of employees";
    cin>>no_of_empl oyees;
    cout<<"enter the monthly salaries of employees";
    for(int i=0;i<20;i++)
    {
    if (emp_sal[i]*12>100000)
    cout++;
    }
    cout<<"no.of employees earning morethan 1 lakh per annum ="<<cout;
    getch();
    }
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You can't use cout as a variable because cout is part of the C++ Standard Library.

    Comment

    Working...