The Image Is Not Displaying

I’m making a project in C++ that uses SDL, I’ve made my own sprite rendering system and yes, I know it’s bad, I’ve copied the paths and triple checked them so It’s most likely fine, the background shows but sadly the button doesn’t appear but the background does. I’m using two files: the main cpp file which basically includes everything except the image rendering function, and an h file which includes the image rendering function.

The cpp file is here: // Snooping through the files are we?// Compile With: g++ main.cpp loadImage -
The h file is here: // Snooping through the files now aren't you?// Compile With: g++ main.cpp l -

It seems like you’re missing a bunch of break statement inside the switch in the loadImage function.

Sometimes I make dumb mistakes, I’m sorry. It worked though, thank you!

Most compilers are able to warn about simple mistakes like this. When I compiled your code I got a bunch of “warning: this statement may fall through” messages. If you’re using GCC or Clang I think you should at least use -Wall. There is also -Wextra that enables even more warnings.