carter Posted April 4, 2014 Report Share Posted April 4, 2014 Hi Some books introducing systemc have .h and .cpp. But i'm not sure about this activities. So Is that mandatory to use systemc what saperate .h and .cpp? If i use class, is this need too? Also i have question onemore. what are you first make between .h and .cpp? Is there any way what make 1 file(.cpp) not (.h and .cpp)? Quote Link to comment Share on other sites More sharing options...
apfitch Posted April 4, 2014 Report Share Posted April 4, 2014 No, it's not required to use separate .h and .cpp with C++. You make the .cpp files - .h files are just included. If I understand your last question - you can put all your code in one .cpp file regards Alan karandeep963 1 Quote Link to comment Share on other sites More sharing options...
karandeep963 Posted April 4, 2014 Report Share Posted April 4, 2014 Well, that is the good enough from the point of readability and understanding, as .h gives u the whole class information like all the data members u have and all the member function declaration etc. It helps in large files, where you need to understand the class nature and explore the particular function as per requirement, unless u have to scroll through the whole file. As Alan said ,yes u can keep everything in a single .cpp. Regards, Karandeep Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.