I’ve created a header file “foo.h” as well as an source file “bar.c” but can’t seem to import bar.c into foo.h.
Is this possible? If so, could someone please point me in the right direction?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ve got it backwards…
.hfiles exist to tell other programs what a.cfile contains. The.cimplements the things listed in the header.Then, when a different program wants to use some of the stuff you implemented, they
#includeyour header. When it compiles, another program called the linker is also run. This connects the functions from the header you used to their implementations.