http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: class Logger



its because you're calling fprintf with '...' as one of the parameters. you
can only use that when declaring functions. the simple answer for how to
solve that is to just remove it.

--Bill

----- Original Message -----
From: "KingFish" <king.fish@myokay.net>
To: "GameProgrammer" <gameprogrammer@gameprogrammer.com>
Sent: Thursday, October 05, 2000 1:10 PM
Subject: class Logger


> Hi guys,
>
>   i'm writting on an class Logger in which given debug strings will be
>   written to a file.
>   My problem is, that i want to format the string so that i'm able to
>   use it as printf but it fails.
>
>   Here is the code:
>
>   void CLogger::Log(char *LogString, ...) {
>       fprintf(m_LogFileStream, LogString, ...); <--- This gives the error
>   }
>
>   The compiler (i use VC++ 6) gives the following error:
>
>   error C2059: syntax error : '...'
>
>   How can i solve that?
>
>   Thanks in advance
>
> ---
> KingFish
> gryphon entertainment - www.kingfish.myokay.net
> ---
> "Truly, if there is true evil in this world,
> it lies within the heart of mankind."
>                         - Edward D. Morrison
>
>
> =================================================================
> The GameProgrammer.Com mailing list is for the open discussion
> of any topic related to the art, science, and business of
> programming games. This list is especially tolerant of beginners.
> We were all beginners once
>
> To SUBSCRIBE or UNSUBSCRIBE please visit:
> http://gameprogrammer.com/mailinglist.html
>
>

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html




  • References: