M
M
Matvey Tarasov2016-07-16 22:53:39
C++ / C#
Matvey Tarasov, 2016-07-16 22:53:39

What can be written in C++ header files?

What can be written in header files? I know I can declare a function there, but can I define it there and call it from there?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Zhilin, 2016-07-16
@Kokosso

Functions cannot be defined in header files, except for inline (in particular, class methods) and template ones. Otherwise, sooner or later, a linking error will occur.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question