Where is the function declare in c plus plus language?

1 answer

Answer

1174102

2026-08-16 20:45

+ Follow

All function interfaces must be declared before they can be used. This is known as a forward declaration and is strictly enforced in C++ (but not in C). To facilitate this, interfaces are typically placed in a header file which can then be included in every source file that requires access to that function. The interface need not be defined (implemented) in the header unless the function is a template function. Typically, implementations are kept separate from interfaces (template function implementations are kept in the header but typically separated from the interface) since the interface contains everything the user needs to know in order to make use of the function.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.