Debug check with cout, storage class type specifier

Is there a way I can do this and get around the "no storage class or type specifier" error?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef FIRSTPLATFORMER_MAIN_H_
#define FIRSTPLATFORMER_MAIN_H_

#include <iostream>
std::cout << "iostream included" << std::endl;

#include <SDL.h>
std::cout << "SDL.h included" << std::endl;

#include <SDL_image.h>
std::cout << "SDL_image.h included" << std::endl;

#include <SDL_mixer.h>
std::cout << "SDL_mixer.h included" << std::endl;

#endif//FIRSTPLATFORMER_MAIN_H_ 
You cannot place statements like that in the global scope; when would they be executed? Additionally, what you are trying to do isn't meaningful anyway, as header inclusion happens at compile-time, not at run-time as your statements imply you believe.
Topic archived. No new replies allowed.