Don't know if this is the right place to post this but...
I just started with SDL, and get the error:

expected constructor, destructor, or type conversion before '*' token


With this code:

#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")


#include "C:\Documents and Settings\Mikael\Mina dokument\SDL\SDL-1.2.14\include\SDL\SDL.h"
#include <cstdlib>
#include <iostream>
#include <string>


using namespace std;


const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_BPP = 32;

SDL_SURFACE *message = NULL;
SDL_SURFACE *screen = NULL;
SDL_SURFACE *background = NULL;

Why is this?

Recommended Answers

All 4 Replies

bumpy?
using dev c++ btw

Try changing SDL_SURFACE to SDL_Surface.

Also, for ease of use, you might try dumping the SDL headers into your IDE's header folder - a wee easier than typing that long string per source file.

Thanks, I'll try that :)

Worked out great, thanks alot :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.