windows - Problems Making Text Based RPG game/template in C++ -


i making text based rpg in c++ class, using multi file tree structure story sections, when 2 of sections merge 1 other story section getting error saying variable section being redefined, have heard of using headers has not been working because don't know how it! here link files: hey on here!

you might forgetting add include guards tops of files. these keep files being compiled more once. have defined variable twice in same scope or function.

example (from wikipedia)

#ifndef grandfather_h #define grandfather_h  // code compiled once // preprocessor directive #ifndef      struct foo {   int member; };  #endif /* grandfather_h */ 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -