In the beginning, I was working on my code and I use to run a piece of code at random and suddenly I found that the was a kind of FATAL Error compiler showing in the terminal and I used to search on web, later on my fried told me to not put any space in the name of project. In the meanwhile, our discussing turned into something else because of no valid reason for the logic that he presented.
Kindly anyone with appropriate logic.
2
Answers
Not an expert but this is my thought regarding this issue.
In shell/command line, every word acts as an input or option passed to the command. So if your file has space in name it basically becomes 2 different inputs.
adjacency
andmatrix
. Most compilation would include some sort of execution like that and so will throw and error.It is possible to have spaces in file and directory names, but you need to handle them in command lines. There are two ways of doing this:
Without doing this, the shell will pass ‘adjency’ and ‘matrix.cpp’ as two separate arguments to g++ which in total will get four arguments: ‘adjency’, ‘matrix.cpp’, ‘-o’, ‘adj’.