-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
# Files | ||
|
||
## Get file content | ||
|
||
```cpp | ||
std::ifstream in(filename, std::ios::in | std::ios::binary); | ||
if (!in) { | ||
std::cerr << "could not open " << filename << std::endl; | ||
return 1; | ||
} | ||
std::ostringstream contents; | ||
contents << in.rdbuf(); | ||
std::string ogg_data = contents.str(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
# Leaks | ||
|
||
```cpp | ||
{{#include ../../../basics/pointing_arguments/cleaning.cpp}} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
# Raw pointers | ||
|
||
```cpp | ||
{{#include ../../../basics/raw_pointers/raw-pointer-container.cpp}} | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
# Weird Map | ||
|
||
```cpp | ||
{{#include ../../../basics/weird_map/weird-map.cpp}} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
# Pointing arguments | ||
|
||
```cpp | ||
{{#include ../../../basics/pointing_arguments/pointing.cpp}} | ||
``` | ||
## C style | ||
```cpp | ||
{{#include ../../../basics/pointing_arguments/c-style.cpp}} | ||
``` | ||
|
||
## By reference | ||
|
||
```cpp | ||
{{#include ../../../basics/pointing_arguments/by-reference.cpp}} | ||
``` | ||
## C++ style | ||
```cpp | ||
{{#include ../../../basics/pointing_arguments/cpp-style.cpp}} | ||
``` |
0941887
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://cpp-by-example.netlify.app as production
🚀 Deployed on https://66a5cf530aed3bd4ea86f4e2--cpp-by-example.netlify.app