Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!unixhub!ditka!comeau From: comeau@ditka.Chicago.COM (Greg Comeau) Newsgroups: comp.sys.amiga.programmer Subject: Re: Lattice C++ Message-ID: <38576@ditka.Chicago.COM> Date: 10 May 91 14:10:16 GMT References: <1474@loki.une.oz.au> Sender: comeau@ditka.Chicago.COM (Greg Comeau) Reply-To: comeau@csanta.attmail.com (Greg Comeau) Organization: Comeau Computing Lines: 31 In article <1474@loki.une.oz.au> kevin@loki.une.oz.au (Kevin Pollard) writes: >I am trying to help someone with an Amiga and Lattice C++. >Initially, I don't want to have to master C++ just to help him, so I want >to stick to standard C. That's one valid approach to it. >Can I access graphics in standard C using Lattice C++? Some people on BIX said this was impossible a while back. Personally, I disbelieve such a response however with Lattice C++, based on the 1.x spec of C++, such a request involved some gymnastics depending upon exactly what it is you're trying to do and how. >If so, what's the smallest program (this isn't a challenge) that will >set graphics mode and draw a line on the graphics screen, then wait >for a keystroke, then exit. I'm not versed enough in AmigaDOS specific, however what I can tell you is that compiler supporting either the 2.0 or 2.1 spec of C++ have something called 'extern "C"' syntax which allows you an interface to C. Under some, for instance, Comeau C++, we literally pick up your C compilers include files. Hence, the call in C++ would be *EXACTLY* the same as it would be in C. - Greg -- Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418 Producers of Comeau C++ 2.1 Here:attmail.com!csanta!comeau / BIX:comeau / CIS:72331,3421 Voice:718-945-0009 / Fax:718-441-2310