c++ - Executable wont' run after moving to a different folder -


i had existing c++ program compiled in ubuntu 14.04 using g++-4.8. run program on terminal passing file, prints processed data in console:

#./my_program.cpp.exe < data.in  employee id            1 marital status         s grosspay          100 tax amount        5 netpay            95 

this program stored in ~/documents/module2. created new directory ~/documents/module3 , copied both files, my_program.cpp.exe , data.in, folder , when run it, doesn't print output console.

#./my_program.cpp.exe < data.in # 

i'm not sure if c++ issue or linux/ubuntu issue i'm asking here. feel either or them.

when list files show:

#ls -rw-r--r-- 1 user    user -rwxr-xr-x 1 user    user    my_program  ... plus other files (11 total) 

but when list folders come as:

drwxr-xr-x  2 user    user    module3 drwxrwxr-x  3 user    user    module2 

which i'm not sure if 2 after permissions makes sense.

to info file i'm using:

ifstream fin( "employee.txt" ); // declare file streams 

no no hardcoded links other same dir running program. afterwards basic math , print standard output:

cout << " employee id            " << employeeid << endl; 

i "diff-ed" both files (data.in , my_program.cpp.exe) originals , identical.

thanks help!


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -