I had an existing c++ program that I compiled in Ubuntu 14.04 using g++-4.8. To run this program on the terminal by passing it a file, which prints processed data in the console:
#./my_program.cpp.exe < data.in
EMPLOYEE ID IS 1
MARITAL STATUS IS s
YOUR GROSSPAY IS 100
YOUR TAX AMOUNT IS 5
YOUR NETPAY IS 95
This program is stored in ~/Documents/module2. I created a
new directory ~/Documents/module3 and copied both files, my_program.cpp.exe and data.in, to this folder and now when I run it, it doesn't print any output to the console.
#./my_program.cpp.exe < data.in
#
I'm not sure if this is a c++ issue or a Linux/Ubuntu issue so I'm asking here. I feel like it could be either or them.
When I list the files they show:
#ls
-rw-r--r-- 1 user user
-rwxr-xr-x 1 user user my_program
... plus other files (11 total)
but when I list the folders they come up as:
drwxr-xr-x 2 user user module3
drwxrwxr-x 3 user user module2
which I'm not sure if that 2 after the permissions makes sense.
to get info from the file I'm using:
ifstream fin( "employee.txt" ); // Declare file streams
no so no hardcoded links other than the same dir where running the program. All I do afterwards is basic math and print to standard output:
cout << " EMPLOYEE ID IS " << employeeid << endl;
I "diff-ed" both files (data.in and my_program.cpp.exe) with the originals and they are identical.
Thanks for any help!
.and... – Jonny Henly Apr 25 '16 at 5:17ls -l). – Some programmer dude Apr 25 '16 at 5:40