ho creato un file con estensione ".c" e dentro ci ho messo:
#include
using namespace std;
main()
{
int a=5;
cout<<a;
}
ma eseguendo il comando:
gcc test.c -o test.h
mi da questo errore:
test.c:1:20: error: iostream: Nessun file o directory
test.c:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘namespace’
test.c: In function ‘main’:
test.c:6: error: ‘cout’ undeclared (first use in this function)
test.c:6: error: (Each undeclared identifier is reported only once
test.c:6: error: for each function it appears in.)
mi potreste dire dove ho sbagliato?