Is is possible to print a message cout << "success" after successful compilation of a program..?
I actually want to give user the options to do various things for which user should pass runtime arguments.
But the obvious question is how the hell end user going to know the format of passing runtime arguments..So after compiling the program I want to print message that this this is the format you should run the program in..
Yes, that can be done easily. But my user is going to compile the program everytime he is going to use it.. so why should I fail him even once? Isn't it my responsibility to acknowledge him how to use my program..?
I was wondering if I need to edit the compiler. See its going to generate executable. So just after that executable is created it will just accept few things from my program and print it as it is.
Or another way I thought, the directory in which that executable is put, in unix, is also a file. So can I edit that file (directory file) to just accept arguments which it will echo.
I need you guys help to do this, as i'm new to cpp.
well my program compilation is quite normal like g++ filename.cpp
what is important for me is how to run executable created by source code which isrun like
sort.o filename sorting_algorithm_name output_on
is the general format to run the program
and a general example sort.o input.txt heap output.txt
note that output_on can be anything...from terminal to mailing the output (i use mail command of unix for this).
So after compiling i would want the message on the terminal like
general format to run the program is: sort.o filename sorting_algorithm_name output_on
witth some options.