Function Prototype

Discussion in 'Computer Science & Culture' started by S.Tarafdar, May 17, 2003.

Thread Status:
Not open for further replies.
  1. S.Tarafdar Registered Senior Member

    Messages:
    35
    I am now dealing with funtions in c++ programming.What if we had had not 'Function Prototype'?Isn't 'Function Definition' enough to call a function?In C it's not needed ,but why is it incorporated in c++?

    Thanks in advance.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. SG-N Registered Senior Member

    Messages:
    1,051
    I don't know why you are allowed to use functions without using a "prototype" in C... That's an easy way to make a C program that should not be used !
    When I use C, I put all my headers in ".h" files while the bodies are in ".c" files. That's better for the "includes" as the compilator don't have to load the unused functions... (it just loads their headers).
    Thus I don't have any problem when I use C++, with which we have to write the "functions prototypes"
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
Thread Status:
Not open for further replies.

Share This Page