1) if your files will be in program execution folder, there is no need to specify full path.
2) strcat("D:/TUGAS/1/1",b); You cannot do that. It will try to append b string to const literal, what is forbidden but will work because of compatibility conversion to char* (Should give you a warning).
3) Even it it would work, you forgot another slash at the end of line, so if you enter "test", you wil be trying to open "D:/TUGAS/1/1test"
here's something about windows:
1)- windows -unlike linux- uses a backslash, not a slash.
2)- and in c++, you can't write a backslash directly, to write a backslash in a string literal you should write two backslashes.
replace line 6 with this:
what the use of "R", if i add it, the program error, it's say call 1 or 2, if i call 2, we type the file that we search, if it in the folder, the file will open, if not, then it's end of program
what the use of "R", if i add it, the program error
Oh, you have an outdated compiler which doesn't support C++11.
Ok, use "D:\\TUGAS\\1\\1\\"
I want to see, what exactly you are typing, and screenshot of folder with actual files.
Example
I am typing "Velocities.xls"
My folder looks like http://gm4.in/i/du0.png