Path: utzoo!attcan!uunet!mcvax!hp4nl!kunivv1!atcmpe!leo From: leo@atcmp.nl (Leo Willems) Newsgroups: comp.lang.c++ Subject: declaration problem Keywords: default declaration Message-ID: <534@atcmpe.atcmp.nl> Date: 10 Aug 89 17:57:03 GMT Organization: AT Computing, Nijmegen, The Netherlands Lines: 34 In `The C++ programming language' in r8.4.1 the following statement puzzles me: The declaration: fseek(FILE*, long, int); declares a function taking three arguments of the specified types. SINCE NO RETURN TYPE IS SPECIFIED IT IS TAKEN TO BE INT. I can understand this default behaviour in a function definition, in an example with a declaration it fails: main(){ int x; function(int,int,int); // mark int y; function(1,2,3); } The marked line is flagged with a syntax error. Prepending `int' on that line takes away the problem as expected. It seems to me that I am using the book's example in the wrong context. Can someone give me an example how to apply the fseek example correct? Thanks. Leo Willems Internet: leo@atcmp.nl AT Computing UUCP: mcvax!hp4nl!kunivv1!atcmpe!leo P. O. Box 1428 6501 BK Nijmegen Phone: +31-80-566880 The Netherlands Fax: +31-80-555887