Home » Questions » Computers [ Ask a new question ]

How can I fix my C++ compiler as it isn't loaded by default?

How can I fix my C++ compiler as it isn't loaded by default?

Recently I had installed the Ubuntu flavour of the Linux operating system. I had opened a terminal and just wrote a sample C program to check if it is compiling. When I saved the sample file and compiled with cc a.c, errors comes that the standard library is not loaded (i.e stdio.h). When I went to help pages, it says that the C or C++ compiler doesnt gets loaded by default and we should do it ourselves.

Asked by: Guest | Views: 420
Total answers/comments: 1
Guest [Entry]

"You need to add this to the beginning of your a.c file:

#include <stdio.h>"