Home>
I'm trying to use LoadDivGraph from the DX library in C ++
An unhandled exception occurred in 0x00007FF7C1B69BAA (Project1.exe): 0xC0000005: An access violation occurred while reading location 0x0000000000000040. Has occurred
Corresponding source code
#include "DxLib.h"
int WINAPI WinMain (_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nShowCmd) {
if (DxLib_Init () == -1) {return -1;} // DX library initialization process-Exit immediately if an error occurs
ChangeWindowMode (TRUE);
SetGraphMode (1280, 720, 16);// Graphic screen enlargement
SetTransColor (255, 255, 255);// Transparent color setting (white)
SetDrawScreen (DX_SCREEN_BACK);// Drawing range setting (back screen)
int passerby1 [3];
LoadDivGraph ("passerby1.png", 3, 3, 0, 152, 157, passerby1);
int i = 0;
while (i! = 3) {
DrawGraph (x, 0, passerby1 [i], FALSE);
++ i;
}
DeleteGraph (passerby1 []);
DxLib_End ();// Termination process of using DX library
return 0;// Exit the software
}
What I tried
I looked it up, changed variables, and used pointers.
Supplementary information (FW/tool version, etc.)Visualstdio 2019
-
Answer # 1
Related articles
- when i try to use a c ++ template type argument in a function, i get an error if the type is different
- c ++ - the result is different between the function using simd extension instruction and the ordinary function
- c ++ - i get an error when i try to compile opencv
- php fatal error: call to a member function fetchrow () does not show site
- i want to add a comment function to a post with django, but i get an error
- function - although it is mql4 language, i get an error when compiling with this code
- ruby on rails - cart function routing error cannot be resolved
- c ++ - c language: please tell me how to deal with the error message "bus error"!
- c ++ - does calling a function via a dll slow down the operation?
- c ++ - if the file cannot be found, an error will occur
- c ++ - i get an error saying that the special member function generated by the compiler cannot be defined
- c ++ - how to select a function from type
- jquery - i get an error about $() animate is not a function
- python - i want to learn using my own error function in tensorflow
- error occurred in postgresql trigger function and stored procedure
- c ++ - i get a syntax error
- how to pass a string as a function argument in c ++
- c ++ - i want to know how to fix the error that liexe does not exist in mingw when trying to build the ffmpeg library
- vscode c ++ cmake "error: no available generator found"
Related questions
- c ++ - i want to randomly place images in the dx library
- c ++ - i want to know the difference between the light information of the vertex information and the material information direct
- c ++ - i want to know how to change the animation switching speed according to the moving speed
- c ++ - i want to delete a file
- c ++ - 2d action game i want to know the algorithm that recognizes the judgment when hitting a block from below
- c ++ - i want to implement a homing missile
- c ++ - i want to know how to determine vertex information in 3d drawing vertex3d
- c ++ - draw a polygon in 3d space want to know the reason why you cannot draw a camera?
- c ++ - how to rotate drawn polygons what should i do with mathematical formulas?
- c ++ - how to paste different textures on different surfaces i want to know which library function to use
I have not confirmed the operation, but
YNum
Is1
So what?