Search code examples
c++header-filesgedit

How to add a c++ header file in "gedit" editor?


I am a newbie in C++. I would like to add the following as a header file.

#include "std_lib_facilities.h"

I have surfed through the internet and have found few tutorials how to add them in visual basics and others but not gedit!

I am using linux and using gedit as the editor and running the program through terminal.


Solution

  • It's the same way as you specify any other header file. At the beginning of your source code (.cpp), just use include "PATH_OF_HEADER_FILE". Make sure you use the gcc or any other compiler to link the header files. Execute gcc your_cpp_file in the terminal. And then run normally.