uchicago-mobi / 2015-Winter-Forum

8 stars 1 forks source link

Best Practice for Global Vars #206

Closed egbertc closed 9 years ago

egbertc commented 9 years ago

I have a bunch of constants and functions that need to be shared across all my classes. should I create a class like "AppUtilities.h" that holds all the constants and any utility functions and just import that class in every other class?

currently I find myself importing stuff all over the place and it's just asking for disaster.

tabinks commented 9 years ago

.pch file would be perfect, it's imported automatically in every file.

egbertc commented 9 years ago

appreciate it!