Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I compiled the program using gpp it was done successfully but when I tried to run the program I got these errors:-

I have included using namespace std; in 3'rd line

harish@harish-Lenovo-G580:~$ gpp iget.cpp -o abc
harish@harish-Lenovo-G580:~$ gpp -o abc iget.cpp
harish@harish-Lenovo-G580:~$ ./abc
./abc: line 3: using: command not found
./abc: line 5: struct: command not found
./abc: line 14: syntax error near unexpected token `('
./abc: line 14: `void getno()'
share|improve this question
can we see the source code? – Lynob Feb 10 '14 at 20:11
#include<iostream.h> using namespace std; struct inode { int ino; struct inode *nxt; struct inode *flst; }*hsq[4]={NULL},*frl=NULL; void getno() { int n; char a='a'; – Harishbhutra Feb 10 '14 at 20:14
this is starting portion upto line 17 – Harishbhutra Feb 10 '14 at 20:15

You need to use g++ not gpp e.g.

g++ -o abc iget.cpp

gpp is a pre-processor - not a compiler. It doesn't actually compile your code, and when you try to run ./abc the shell is likely trying to interpret the pre-processed source code as a sequence of shell commands (which are 'not found').

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.