Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

closed when I try to include another c-header file, I get an error: compilation terminated.

0 votes
asked Sep 29, 2021 by Peter Fischi (320 points)
closed Sep 30, 2021 by Admin
If my program consists of multiple files, and I try to include them at the top of my main file, (#include <somefile.h>) The compiler gives an error saying "compilation terminated" with no other info. is this a bug in the compiler or am I doing something wrong?
closed with the note: answered

1 Answer

+2 votes
answered Sep 30, 2021 by Admin (5,100 points)
If possible, could you share your code using link generated via "Share" button in IDE? That may help us to understand better.
commented Sep 30, 2021 by Peter Fischi (320 points)
edited Sep 30, 2021 by Peter Fischi
https://onlinegdb.com/BuvLn7JYX
I am still working on it so some of the functions are blank, but I do not think that should be the problem.
when I use a desktop compiler (embarcadero dev c++) the compilation works just fine.
commented Sep 30, 2021 by Admin (5,100 points)
Since functions.h is non-standard header file.
You may want to include is using double quote instead of angular bracket.

Try using
#include "functions.h"
Instead of
#include <functions.h>
commented Sep 30, 2021 by Peter Fischi (320 points)
Thank You! that worked fine.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...