Date: Mon, 12 Oct 1998 13:48:12 +0100 (BST) From: George Foot To: djgpp AT delorie DOT com Subject: Re: function basics In-Reply-To: <3621D7C5.689D9A20@earthlink.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Mon, 12 Oct 1998, Martin Ambuhl wrote: > Reread the section of your text on the proper form of arguments. > Consider the differences between the following and your original code: > > #include > void prompt(int *hrs, int *mnts) > { > printf("Please enter beginning time, " > "hours & minutes separated by whitespace\n" > "> "); > scanf("%d %d", hrs, mnts); > } I don't think there was anything wrong with his original version of this function -- it just used C++ references. The only problem I saw was with the `printf' line taking addresses when it shouldn't do. -- george DOT foot AT merton DOT oxford DOT ac DOT uk xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html