[LC++]problem about defining an array

gosh larous glarous at yahoo.com
Fri Jul 27 15:02:12 UTC 2001


Hi all,

I have written a function in C: writee(double h, double level,....)
in the body of this function I have an array which it's size is equal to level: strr[level]. But when I run my program. It gives me an error like this: "constant expression required" in the line that I have written strr[level]. 
I just know if I write "#define level" in the up of my program,this problem would be solved. But if you have any other idea that I can improve my program with it.

writee(double h, double level,....)
{
strr[level];
...
...
}

Thank you for you attention in advance.
cheers
Gosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/tuxcpprogramming/attachments/20010727/a5bbd29c/attachment.html 


More information about the tuxCPProgramming mailing list