### Don't know what's the error. Reply fast!

In 83rd line message says: "Illegal Structure operation". But I didn't use any structures!
What's the problem? And how to correct it?

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157`` ``````#include #include #include int prime(int); int reverse(int) ; int power(int,int); int rectangle(int,int); int square(int); int circle(int); void tables(int); void main() { clrscr(); int p, g, m; float q, r, k, l, s, t; cout<<"This program executes as per your choice."<>g; switch(g) { case 1: {cout<<"Number is prime -->1. Number is not a prime-->-1"<>p; cout<>p; cout<>q; cout<<"Enter the power to be raised to: "; cin>>r; cout<>m; if(m==1) { cout<<"Enter length and breadth of the rectangle: "; cin>>k>>l; cout<<"Area of rectangle is: "<>s; cout<<"Area of square is: "<>t; cout<<"Area of circle is: "<>p; cout<0) { j=j/10; flag++; } while(b>0) { y=b%10; sum+=y*(pow(10,flag)); flag--; b=b/10; } return sum; } float power(float c, float d) { for(int i=0; i
Last edited on

83. cout<<tables(p);

just use

83. tables(p);
> In 83rd line message says: "Illegal Structure operation".
Don't paraphrase.
After fixing your headers (is just `iostream', and `cout' is in the `std' namespace)
 ```\$ g++ -W{all,extra} foo.cpp 2>&1 | grep error foo.cpp:83:11: error: no match for ‘operator<<’ in ‘std::cout << tables(p)’ \$ clang++ -W{all,extra} foo.cpp 2>&1 | grep error foo.cpp:83:11: error: invalid operands to binary expression ('ostream' (aka 'basic_ostream') and 'void')```

¿do you understand why `cout << tables(p);` makes no sense?
Last edited on
Ok did that. But then it gives 4 linker errors:
Undefined symbol circle(int) in module JOINT.CPP
Undefined symbol square(int) in module JOINT.CPP
Undefined symbol rectangle(int, int) in module JOINT .CPP
Undefined symbol power(int, int) in module JOINT.CPP

:| :/
Maybe you'll want to try to respect the prototype.
What do you mean me555?
 ``123456789`` ``````int power(int,int); //your prototype float power(float c, float d) //your definition { for(int i=0; i
¿Do you see the difference, Vinkerd?
Topic archived. No new replies allowed.