kyriazis@pawl20.pawl.rpi.edu (George Kyriazis) (02/14/88)
Hello world. I first found that peculiar behaviour trying to write a computer graphics program involving points, lines and polygons. Anyway, here it is: int (*lines)[2]; main() {} is a dummy program that just defines this data structure. What I actually want is a pointer to arrays of 2 ints. I believe that int *lines[2] will do the reverse, ie. give me two pointers to int. Anyway, when I run it thru dbx on a SUN and ask 'whatis lines' I get this: int (*lines)[8196]; As far as I know, this is a *BIG* mistake? Or am I wrong? I'll try to compile the same thing to different machines and see what I get there... ******************************************************* *George C. Kyriazis * Gravity is a myth *userfe0e@mts.rpi.edu or userfe0e@rpitsmts.bitnet * \ / *Electrical and Computer Systems Engineering Dept. * \ / *Rensselear Polytechnic Institute, Troy, NY 12180 * || ******************************************************* Earth sucks.
chris@trantor.umd.edu (Chris Torek) (02/14/88)
In article <360@imagine.PAWL.RPI.EDU> kyriazis@pawl20.pawl.rpi.edu (George Kyriazis) writes: >int (*lines)[2]; > >... What I actually want is a pointer to arrays of 2 ints. ... >Anyway, when I run it thru dbx on a SUN and ask 'whatis lines' I get this: > >int (*lines)[8196]; Your Sun's dbx (or compiler) is buggy. Sun's dbx releases seem to be almost as buggy as those in 4.2BSD. -- In-Real-Life: Chris Torek, Univ of MD Computer Science, +1 301 454 7163 (hiding out on trantor.umd.edu until mimsy is reassembled in its new home) Domain: chris@mimsy.umd.edu Path: not easily reachable