Schrödinger's hat Posted September 30, 2011 Posted September 30, 2011 sir,is prototyping inportant in c++? Seeing as noone else is answering this, I'll try and provide something. It's been a while since I did anything C, and even then I was fairly ameturish -- so take this with a grain of salt, I may not even be explaining the right concept: Function prototypes are used to inform the compiler that you've defined the function elsewhere in your program. They allow you to get the full declaration of the function out of where you define it and put it somewhere more meaningful for a human user, so they're good for structuring the code and making it readable.
khaled Posted September 30, 2011 Posted September 30, 2011 Function prototyping are important when: -- you are separating your library into an interface .h and a source .cpp -- you need to use the functions before you are defining them -- when you are using RMI over C++, to offer a Sink -- prototypes are important in definition files (advanced)... -- prototypes are important when using a Dynamic-Linked Library (DLL), where you have to define the function that will later be used as a pointer to the definition within the caller (advanced)...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now