#pragma once
#include "Dot.h"
#include <SDL.h>
#include <SDL_image.h>
#include <stdio.h>
#include <string>
#include <iostream>
#include "Platform.h"
#include "Constants.h"
#include "LTexture.h"
#include "Functions.h"
#include "Enemy.h"
class Cookie : public Enemy
{
public:
void move(SDL_Rect r, SDL_Rect fire[fireQuantity]);
SDL_RendererFlip getFlipType() { return flipType; }
SDL_Rect getBody() { SDL_Rect r = { getMPosX(), getMPosY(), cookieWidth, cookieHeight }; return r; }
void fireCookie(Platform(&p));
private:
SDL_RendererFlip flipType;
const int cookieHeight = 155;
const int cookieWidth = 75;
Platform* platform;
};
void Cookie::fireCookie(Platform(&p)) {
platform = &p;
platform->getRender();
}
declaration is incompatible with void Cookie::fireCookie( &p)
I am unsure why this is happening? Platform is included in the headers and the declaration seems to match. Can anyone help? Sorry I'm pretty new to programming.