Jump to content

doubt?

Featured Replies

sir,is prototyping inportant in c++?

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.

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)...

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.