Lvalue Required(wierd)...

B

Ben Pfaff

Chad said:
void main()
{
 clrscr();
 int (*x)[10];
 (*x)=(int *) malloc( 30 * sizeof (int) );

Did this code fall through a time warp from 25 years ago? :(


Maybe I'm wrong on this one, but it looks like the OP isn't making a
distinction between an array and the elements in that array. I know
these are two different things because I have an old comp.lang.c post
where Ben Pfaff actually explains the differences to me.

The C FAQ has a whole section on the differences. I recommend it
to everyone.
 

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

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,267
Latest member
WaylonCogb

Latest Threads

Top