Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3027

Passing an indefinitely long succession of formatted read/write parameters

$
0
0
Thank you for your much help in the past.

https://en.wikipedia.org/wiki/Borland_C%2B%2B

I wrote a program in Borland C++ (which was last heard of about 1997), and it included this text

/*-----*/
void diprintf(HWND db,int c,char*fmt,...){char C[256];
vsprintf(C,fmt,(&fmt)+1);
SetDlgItemText(db,c,C);};
/*-----*/
int discanf(HWND db,int c,char*fmt,...){char C[256];
GetDlgItemText(db,c,C,256);
C[255]=0;
return vsscanf(C,fmt,(&fmt)+1);}
/*-----*/

This program passes an indefinitely long succession of parameters from one scan/write function to another. It compiled and ran correctly under Borland C++; the compiled form still works, so I had not thought to update it since, until today. In the course of updating it to 2015 Visual C++ the compiler complains here:

"Error (active): argument of type "char **" is incompatible with parameter of type "va_list" "

Please, what should this program text be under Visual C++?

Viewing all articles
Browse latest Browse all 3027

Latest Images

Trending Articles



Latest Images