C++ How to call another cpp file in the script

Asked

Viewed 1,207 times

0

I have two cpp files. One is the main, the other is a secondary that will open windows programs. So I include them both in the same folder.

In the main file, I added: #include iapt2.cpp which is the second part of the script, but it says that there is no file in the directory.

How can I fix this?

  • Give more details of how the project is going, the code. Include a .cpp inside the other is almost always a mistake.

  • I voted to close as a typo, but also because the question is not clear and also because by the suggested editing and comments in the answer that talk about things that are not in the question, only those who knew the problem could answer the question.

1 answer

0


Try:

#include "nomedocpp.h"

OBS: use quotation marks

  • It worked.I think now I have to declare the function, to give correct continuation?

  • Yes, now you can access the resources you create in this cpp file.

  • Thanks for the help. D

  • You are welcome. When your problem is selected, mark it in the answer. Any questions do the Tour to better understand.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.