Subj : Problem with my usage of conio.h To : borland.public.cpp.borlandcpp From : ncf Date : Sat Jan 29 2005 05:45 pm Please excuse the ignorance as I'm fairly new to C/C++. I'm writing a simple program to print a screen-wide frame of astericks and put text inside of that from the command line. My issue comes in getting the screensize. I read online that conio.h had a function called screensize() in it. I cound't find it but I did find a function called gettextinfo() that returns a struct containing screenheight and screenwidth. So I decided to attempt writing a wrapper function to get them. (Excuse the complexness, but for me to learn a new language, I have to push myself to use stuff that may or may not be quite pointless!) I'm running the free compiler (v5.5) on WinXP SP2. Can someone please inform me as to why this is not working? All details follow Thanks in advance -Wes Here is the code in question: /* imports */ #include #include /* The structure */ struct screen_size { unsigned char x; unsigned char y; }; /* function definition */ screen_size screensize(); /* the code in question (wrapped into a main()) */ int main() { struct screen_size ss; ss = screensize(); printf("(%d,%d)",ss.x,ss.y); return 0; } screen_size screensize() { struct text_info* ti; struct screen_size ss; gettextinfo(ti); ss.x = (ti.screenwidth); ss.y = (ti.screenheight); return ss; } The errors I'm getting with this abbreviated code: Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland crap.cpp: Error E2294 crap.cpp 31: Structure required on left side of . or .* in function screensize() Error E2294 crap.cpp 32: Structure required on left side of . or .* in function screensize() *** 2 errors in Compile *** .