Original Post
I am using C++, SDL, and SDL_Image. I am having trouble with an [font=courier new,courier,monospace]Init()[font=comic sans ms,cursive] [font=arial,helvetica,sans-serif]function for loading a [font=courier new,courier,monospace].png[font=arial,helvetica,sans-serif] into a [font=courier new,courier,monospace]SDL_Surface[font=arial,helvetica,sans-serif].[/font][/font][/font][/font][/font][/font][/font][font=courier new,courier,monospace][font=comic sans ms,cursive][font=arial,helvetica,sans-serif][font=courier new,courier,monospace][font=arial,helvetica,sans-serif][font=courier new,courier,monospace][font=arial,helvetica,sans-serif]I'm trying to load the [font=courier new,courier,monospace]file[/font] variable into the [font=courier new,courier,monospace]img [font=arial,helvetica,sans-serif]variable. After that I attempt to load the [font=courier new,courier,monospace].png[font=arial,helvetica,sans-serif] file into my [font=courier new,courier,monospace]SDL_Surface[font=arial,helvetica,sans-serif]. There are no syntax errors or warnings, but the file I want doesn't load into the [font=courier new,courier,monospace]SDL_Surface.[/font][/font][/font][/font][/font][/font][/font][/font][/font][/font][/font][/font][/font][/font]
Bomb Bomb::Init(short speed, short radius, short health, char img[25])
{
Bomb Inst;
Inst.alive = true;
Inst.speed = speed;
Inst.radius = radius;
Inst.file[0] = img[0];
Inst.bomb = IMG_Load(file);
Inst.position.y = 300;
Inst.position.x = 400;
Inst.health = health;
return Inst;
}