Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!dkuug!elctr!dsn From: dsn@elctr.UUCP (Dan Soeren Nielsen) Newsgroups: comp.sys.amiga Subject: lattice C NOVICE question Message-ID: <732@elctr.UUCP> Date: 18 Mar 91 13:40:54 GMT Organization: ElektronikCentralen, Denmark Lines: 45 Hi there, can someone help me with some beginners problems. I'm quit new to programming in C, but after a short course at my company (using Turbo C on PC) I thought I was ready to start with some basic examples on a Amiga (using Lattice Ver 5.0). I started out by typing in the first example in "Amiga bogen", the danish version of "Programmer's guide to the Amiga" by Robert A.Peck. You will see the program below: #include "libraries/dosextens.h" extern struct FileHandle *Open(); main() { struct FileHandle *dos_fh; if (dos_fh = Open("*",MODE_OLDFILE)) { fprintf(dos_fh,"%ls","Hello there!\n"); Close(dos_fh); } else printf("Error!!\n"); } I'v checked it for typing errors several times, but I still end up at the Guru. It seems that the "fprinf" can't be used together with "Open" and "Write" should be used instead. Is this an error in the book or is the problem due to incompatibility with the Lattice compiler? By the way; Where do I find a description of the functions in dosextens I'll be greatfull if somebody could help me out. Klaus --- If this posting contains opinions, they are my own and not that of my employer. E-mail address : kv@elctr.dk