0

Meaning of this segment code

Using a program that translate a .svg file to c++, I find #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <GL/glut.h> #include <GL/glu.h> #include <GL/glaux.h> #include <windows.h> #include <stdarg.h> //I can't understand the next line int (WINAPIV * __vsnprintf)(char *, size_t, const char*, va_list) = _vsnprintf; _______________________________________________ What does this last line mean? Thank you in advance

21st Oct 2018, 7:30 PM
Daniel Bandeira
Daniel Bandeira - avatar
2 Respostas
+ 3
It's a function pointer: 1. named __vsnprintf, (*__vsnprintf); 2. using the cdecl calling convention, (WINAPIV); 3. it takes 4 arguments of types ( char*, size_t, const char* and va_list ); 4. returns an int ( the int at the front ); 5. and is pointing to the function _vsnprintf ( = _vsnprintf ). And that's the reason function pointers aren't a very liked part of C/C++.
21st Oct 2018, 8:15 PM
Dennis
Dennis - avatar
0
thank you!!!
21st Oct 2018, 8:56 PM
Daniel Bandeira
Daniel Bandeira - avatar