Decided to make a RPG Adventure game using Allegro and C++ and I want to split my files up. Here's what I would want them to do.
main.cpp
Code:
#include "player_class.cpp"
#include <allegro.h>
int main(){
allegro_init();
return 0;}
END_OF_MAIN();
player_class.cpp
Code:
#include "player_stats.hpp"
int class_setup(int player_class){
player_class = 1;
return player_class;}
player_class = class_setup(player_class);
player_stats.hpp
Code:
int player_class = 0;
That's the jist of what I want, but I get errors when compiling it. I'm just wondering why that is and how to fix it?