i am a c++ beginnner nd i am not getting the point why class is defined before main()function i.e globally:-O
inspire_all
-4
Newbie Poster
Recommended Answers
Jump to PostClass definitions are normally put in header files, which are included in the *.cpp file. This is done do that the class can be used anywhere within the program, not just main(). Right now you are probably writing very simple programs that contain only a main() function. What would you …
All 2 Replies
thines01
401
Postaholic
Team Colleague
Featured Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.