Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!wuarchive!udel!haven!grebyn!jmbj From: jmbj@grebyn.com (Jim Bittman) Newsgroups: comp.lang.c Subject: Difference between Pointers and Arrays Keywords: Please Help Me I'm Stuck! Message-ID: <19428@grebyn.com> Date: 3 Mar 90 09:41:41 GMT Organization: Grebyn Timesharing, Vienna, VA Lines: 20 Could someone please help me, I'm sure this is a fundamental question, but I can't seem to figure it out. I am calling a library routine that expects an address, it works when I declare the array, but not when I allocate memory to a pointer. I'm using Turbo C 2.0 and the large Memory Model. double x[256]; double *xp; int i; main() { xp = farcalloc(256,8); for i = *(xp + i) = expression; for i = x[i] = *(xp + i); /* I did this to verify xp set correctly */ LibRoutine(xp,...) /* doesn't work */ LibRoutine(x,...) /* does work */ } Thanks for any help, mail would probably be better than cluttering the net. Jim Bittman, jmbj@grebyn.com