cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
writing functions and classes
writing functions and classes
Jul 2, 2014 at 7:17pm UTC
darkn3ss
(42)
I was just wondering,do people usually write their function definitions, prototypes and classes in a separate file or all in main? Which one is the better practice?
Jul 2, 2014 at 7:20pm UTC
AbstractionAnon
(6954)
Best practice is to write your class declaration in a .h file and your class implementation in a .cpp file.
Jul 2, 2014 at 10:28pm UTC
darkn3ss
(42)
Alright. Ill stop writing my decelerations and definitions in main then and start practicing writing it separately
Topic archived. No new replies allowed.