Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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? –  Fischer Feb 10 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 at 20:14
    
this is starting portion upto line 17 –  Harishbhutra Feb 10 at 20:15
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.