Gcc Error Unterminated #ifndef
Contents |
int number; class PhNumbers
Unterminated Conditional Directive
{ public: PhNumbers(); PhNumbers(number priv, number work, number mobile); PhNumbers(const PhNumbers& n); number
C Ifndef
get_priv()const {return nb[p];} number get_work()const {return nb[w];} number get_mobile()const {return nb[m];} void set_priv(number priv) {nb[p] = priv;} void sett_work(number work) {nb[a] = work;} void sett_mobil(number mobile) {nb[w] string does not name a type = mobile;} void write(); private: number nb[3]; enum phone_type {p, w, m}; }; Last edited on Sep 10, 2008 at 1:10pm UTC Sep 10, 2008 at 1:18pm UTC helios (13230) No #endif Sep 10, 2008 at 1:24pm UTC liengen (4) Ah! Of course! Thanks :-) Topic archived. No new replies allowed. C++ Information Tutorials Reference Articles Forum Forum BeginnersWindows ProgrammingUNIX/Linux ProgrammingGeneral C++ ProgrammingLoungeJobs Home page | Privacy policy© cplusplus.com, 2000-2016 - All rights reserved - v3.1Spotted an error? contact us
here for a quick #if !defined overview of the site Help Center Detailed answers undefined reference to c++ to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads http://www.cplusplus.com/forum/beginner/4064/ with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign http://stackoverflow.com/questions/567788/c-preprocessor-unexpected-compilation-errors up C++ preprocessor unexpected compilation errors up vote 2 down vote favorite 1 Please look at the following file: (it is a complete file) #ifndef TEES_ALGORITHM_LIBRARY_WRAPPER_H #define TEES_ALGORITHM_LIBRARY_WRAPPER_H #ifdef _TEES_COMPILE_AS_LIB #include
Post your question and get tips & solutions from a community https://bytes.com/topic/c/answers/811448-preprocessor-directive-including-another-one of 418,553 IT Pros & Developers. It's quick & easy. Preprocessor directive including another one P: n/a Stefano Sabatini Hi all C speakers, I would like https://answers.yahoo.com/question/index?qid=20140924193734AAXUCSK to implement a macro which sets a field in a struct only if a certain preprocessor symbol has been defined. That is how one would gcc error naively implement this: ---------------------------------8<------------------------------- #include Answers Home All Categories Arts & Humanities Beauty & Style Business & Finance Cars & Transportation Computers & Internet Consumer Electronics Dining Out Education & Reference Entertainment & Music Environment Family & Relationships Food & Drink Games & Recreation Health Home & Garden Local Businesses News & Events Pets Politics & Government Pregnancy & Parenting Science & Mathematics Social Science Society & Culture Sports Travel Yahoo Products International Argentina Australia Brazil Canada France Germany India Indonesia Italy Malaysia Mexico New Zealand Philippines Quebec Singapore Taiwan Hong Kong Spain Thailand UK & Ireland Vietnam Espanol About About Answers Community Guidelines Leaderboard Knowledge Partners Points & Levels Blog Safety Tips Computers & Internet Programming & Design Next How do you get rid of unterminated #ifndef error? candidates.h #include "state.h" using namespace std; extern const int maxCandidates = 10; extern string candidate[maxCandidates]; extern std::string candidateNames[maxCandidates]; extern int nCandidates; extern int nCandidatesInPrimary; extern int findCandidate (std::string name); extern void... show more candidates.h #include "state.h" using namespace std; extern const int maxCandidates = 10; extern string candidate[maxCandidates]; extern std::string candidateNames[maxCandidates]; extern int nCandidates; extern int nCandidatesInPrimary; extern int findCandidate (std::string name); extern void readCandidates (); extern void assignDelegatesToCandidates (); extern int findCandidate (std::string name); state.h #ifndef STATE_H #define STATE_H #include