error C4700: an uninitialized local variable used
struct BITMAPFILEHEADER { }; struct BITMAPINFOHEADER { }; struct RGBQUAD { }; void firstaction(BITMAPFILEHEADER, BITMAPINFOHEADER, RGBQUAD, FILE); int main() { BITMAPFILEHEADER header; BITMAPINFOHEADER bmiHeader; RGBQUAD *pixels; firstaction(header, bmiHeader, *pixels, *pFile); // тут ошибка на первые 3 аргумента } void firstaction(BITMAPFILEHEADER header, BITMAPINFOHEADER bmiHeader, RGBQUAD *pixels, FILE *pFile) { } Who can tell what I was wrong?
headerandbmiHeaderI'm not sure what the rules say about the default constructor. But withpixelsproblem is absolutely certain: RGBQUAD * pixels code; only declares a pointer toRGBQUAD, but its value is arbitrary. You need to first allocate memory for a variable of typeRGBQUAD, and initialize the pointer with the address of this variable. - VladD