Home > Software engineering >  Use CImage class according to project images in the directory should put pictures in the project dir
Use CImage class according to project images in the directory should put pictures in the project dir

Time:10-11

Why to run the program always can't find the picture?

CodePudding user response:

Learn to debug,

CodePudding user response:

Use GetCurrentDirectory function to obtain the location of the current directory, you know,

CodePudding user response:

Recommend using GetModuleFileName for. Exe path, splicing resource path again

CodePudding user response:

The debug mode and put it on and source directory, at the same level directly run exe, into and exe directory at the same level

CodePudding user response:

You specify the path to the wrong ~
  • Related