|
|
|
|
255
|
|
255
|
|
256
|
#### Instructions
|
256
|
#### Instructions
|
257
|
|
257
|
|
258
|
-1. Notice the following line in the main funcion.
|
|
|
|
|
258
|
+1. Notice the following line in the main funcion.
|
|
|
259
|
+
|
259
|
```cpp
|
260
|
```cpp
|
260
|
filemanip file("dvd_csv.txt") ;
|
261
|
filemanip file("dvd_csv.txt") ;
|
261
|
```
|
262
|
```
|
262
|
- Its purpose is to associate the object called `file` with the data file `dvd_csv.txt`. When openning a data file in a program it is often necessary to specify the file's **absolute path** to guarantee that the program finds the file regardless of where the executable is placed.
|
|
|
|
|
263
|
+ Its purpose is to associate the object called `file` with the data file `dvd_csv.txt`. When openning a data file in a program it is often necessary to specify the file's **absolute path** to guarantee that the program finds the file regardless of where it is executed.
|
263
|
|
264
|
|
264
|
Find out the **absolute path** of `dvd_csv.txt` and substitute it for the current `"dvd_csv.txt"` string. For example, after the change the line might look as follows:
|
265
|
Find out the **absolute path** of `dvd_csv.txt` and substitute it for the current `"dvd_csv.txt"` string. For example, after the change the line might look as follows:
|
|
|
266
|
+
|
265
|
```cpp
|
267
|
```cpp
|
266
|
filemanip file("/home/eip/functions-dvdinfo/dvd_csv.txt") ;
|
268
|
filemanip file("/home/eip/functions-dvdinfo/dvd_csv.txt") ;
|
267
|
```
|
269
|
```
|
268
|
|
270
|
|
|
|
271
|
+ Compile and run the program and check if no errors ocurred.
|
|
|
272
|
+
|
269
|
1. Perform the following implementations in the `main` function (in the `main.cpp` file):
|
273
|
1. Perform the following implementations in the `main` function (in the `main.cpp` file):
|
270
|
* Add code so that the program displays the movies that have positions from 80 to 100.
|
274
|
* Add code so that the program displays the movies that have positions from 80 to 100.
|
271
|
* Add code so that the program displays only the movies that have “forrest gump” in the title.
|
275
|
* Add code so that the program displays only the movies that have “forrest gump” in the title.
|