Mail Archives: djgpp/1998/10/12/08:50:16
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 <stdio.h>
> 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
- Raw text -