I installed g++ compiler on mandrake using urpmi command and am able to compile and create output files.
g++ -o first first.cpp
But I cant run this created output file.
I also changed the file mode to 777 and tried running it. But it says not a valid command
Please throw some light on this,
1st of all i'll make the asumption that you are runing the output file from a terminal.
2nd have you tried this?
If the output is called 'first', are you running 'first' or './first'?
I am running "first" and not ./first from a TERMINAL
Also , I changed the mode using the command
chmod -c 777 first
it worked with ./first
Whts the difference between ./first and first ...
doesnt the command looks in the current directory unless specified ?
Unless you have . in your path, then your current directory is not searched for executables, so you need to use ./ which means current directory. You could add . to your path to avoid this, but depending on where you put it and what you have in your current directory it may cause some minor annoyances with the program you want not being the one you run. Also, it is generally considered not good to do this for root.