|
From: Goran K. <go...@vo...> - 2003-01-27 16:03:18
|
Here you will find a sample of something i've done for a proprietary display
*.h:
int printfg( const char *fmt, ... );
*.cpp:
int printfg( const char *fmt, ... )
{
char out[200];
int i = vsprintf( out,fmt,(void _ss *) _va_ptr );
// out is formated as would be called sprintf
int x=getx();
int y=gety();
int dx=8*strlen(out)-1;
int dy=8;
dispmy( out,x+8*i,y );
return i;
}
----- Original Message -----
From: "Esteban Valverde" <est...@ho...>
To: "dev-cpp" <dev...@li...>
Sent: Monday, January 27, 2003 4:50 PM
Subject: [Dev-C++] printf
> Hi, I wish to overload the printf function to do the same thing plus
others,
> just like...
>
> void myprintf ( const char *format, ... )
> {
> // I do my work here
>
> printf( format, ... );
> }
>
> How must I do to pass the variable argument list (...) from the definition
> of myprintf to the printf function ?
>
> Bye, Esteban
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|