Date: Tue, 4 Mar 1997 23:28:07 -0500 (EST) From: Michael Phelps To: "W. L. Estes" cc: djgpp AT delorie DOT com Subject: Re: gettextinfo(), cprintf() question In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 4 Mar 1997, W. L. Estes wrote: > When i attempt to compile the following: > > #include > > int main() > { > struct text_info { > unsigned char winleft; > unsigned char wintop; > unsigned char winright; > unsigned char winbottom; > unsigned char attribute; > unsigned char normattr; > unsigned char currmode; > unsigned char screenheight; > unsigned char screenwidth; > unsigned char curx; > unsigned char cury; > } ; > text_info *foo; Unless you are using C++, you need to declare this as struct text_info *foo; > gettextinfo (*foo); My guess is that you want to call function gettextinfo like so: gettextinfo(foo); This way, you pass the pointer, so that the function can pass information back using a statement such as "foo->screenheight = 25;" > cprintf ("%u", foo.screenheight); > return 0; > } > > I am told that text_info and foo are undeclared. what should i be doing? > > and what about the call to cprintf? is that gonna work, if not what should > that be? i just wanna print the screenheight. > > thanks in advance, > --will > > > > ---Michael Phelps morphine AT cs DOT jhu DOT edu CH3 | N / | ______/ | / \ CH2 _____/ \__|__ // \\ / | \\ // \\______/___CH2 \\ \ / \ / \______/ \_____/ / ------ \ / \ OH \ / OH O Morphine