Skip to content

Commit

Permalink
Fix inconsistent variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
philipbl committed Oct 30, 2023
1 parent e1d38bc commit e616313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _labs/io.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ While iterating through a directory, you will need to have an object that corres
The `d_name` value inside of the `dirent` struct holds the file name of the file we are looking at. In order to see what the name of the current file is from a `readdir()` operation:

```c
dir = readdir(dp); // Get the current file object
printf("Item name: %s\n", dir->d_name); // Print out name
entry = readdir(dp); // Get the current file object
printf("Item name: %s\n", entry->d_name); // Print out name
```

#### Filtering Files
Expand Down

0 comments on commit e616313

Please sign in to comment.