It needs to be in the same folder as your executable (or, strictly, where you were running it from). Why have you put it in the doc subfolder? How would your program know where that was?
In your code:
ifstream dosyaOku("okul.txt", ios::in);
This says that it is expecting to find the file okul.txt in the folder from which you launched the program.
From the background of the left-hand image in your picture, this program is being launched from a command window in folder
C:\users\Ihalit\Desktop\odev |
So THAT is where it expects to find okul.txt.
NOT in some "doc" subfolder.
EITHER:
(1) Move okul.txt into the same folder as your executable derle.exe and launch from this folder by simply typing derle.exe (or, even, just derle) or in Windows explorer just double-click derle.exe.
OR:
(2) Navigate within your command window to the doc subfolder. Just type:
cd doc
Then launch the program by typing the correct relative path (here, .., for "up one directory"):
..\derle.exe
OR:
(3) Navigate within your command window to the doc subfolder (as above), then copy derle.exe into that subfolder, then launch derle.exe from within the doc subfolder itself.
Personally, I would work entirely in the command window and do (1).