• Uncategorized

About c++ : Cant-find-compiled-executable-in-Linux-terminal

Question Detail

I’ve created a hello world program in c++ and tried to compile it in c++ like this.

[[email protected] cpp]$ g++ testing.cpp -o testing

I know that the testing file was created because

[[email protected] cpp]$ ls -A
testing  testing.cpp

But when I try to execute the file it can’t find it.

[[email protected] cpp]$ .\testing
bash: .testing: command not found...

I don’t understand whats gone wrong as this is what I’ve been told works.

Question Answer

Linux does not use \ it uses / for directory paths. Try ./testing.

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.