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 wanted to try to write a C++ program in "Monodevelop" and i use Ubuntu 12.10 as a OS. But when i finish writing my program (any program) and want to actually run my program, i get this error:

bash: /home/Username/C++: No such file or directory

Press any key to continue...

That "C++" in "/home/Username/C++" is supposed to be the name of the folder which i wanted to build my project in it and it's name is "c++ projects" now i understand it is because of the space that is between "c++" and "projects", so my question is, is there a way that i can build and run my program in a directory that has a space inside it's name? Now i tried writing the same program in "Code::blocks" and have had no problem. I understand i will have the same "no such file or directory" error if i try to go to a directory that has a space in it's name in the terminal, and it is pretty annoying that i can't have my program ran in the directory that i want it to run. Some help would be appreciated.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You need to quote your path

e.g.

"/home/Username/C++ Projects/MyAwesomeProgram/bin/myawesomeprogram"

or escape the space

/home/Username/C++\ Projects/MyAwesomeProgram/bin/myawesomeprogram
share|improve this answer
    
thank you, it worked. –  AmirRazoR Jan 31 '13 at 19:20

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.