Automatically add include statements in your C code

By | July 10, 2015

A useful keyboard shortcut to automatically include header files is Ctrl + Shift + O (the letter, not the number).

This #include line causes the preprocessor to “include” a copy of the header file such as stdio.h. The angle brackets <> indicates that the file is to be found in the “usual place” which is system dependent.

So the next time you get an error like:

Multiple markers at this line
– incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
– implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]

try hitting those 3 keys to add in any include files you might require.

Leave a Reply

Your email address will not be published. Required fields are marked *