Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Commit 131cd37

Browse files
committed
Examples: fixed crash in default_resource
1 parent c7f35ad commit 131cd37

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

http_examples.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//Added for the default_resource example
1010
#include <fstream>
1111
#include <boost/filesystem.hpp>
12-
#include <array>
12+
#include <vector>
1313
#include <algorithm>
1414

1515
using namespace std;
@@ -110,7 +110,7 @@ int main() {
110110

111111
//read and send 128 KB at a time
112112
const size_t buffer_size=131072;
113-
array<char, buffer_size> buffer;
113+
vector<char> buffer(buffer_size);
114114
size_t read_length;
115115
try {
116116
while((read_length=ifs.read(&buffer[0], buffer_size).gcount())>0) {

https_examples.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//Added for the default_resource example
1010
#include <fstream>
1111
#include <boost/filesystem.hpp>
12-
#include <array>
12+
#include <vector>
1313
#include <algorithm>
1414

1515
using namespace std;
@@ -110,7 +110,7 @@ int main() {
110110

111111
//read and send 128 KB at a time
112112
const size_t buffer_size=131072;
113-
array<char, buffer_size> buffer;
113+
vector<char> buffer(buffer_size);
114114
size_t read_length;
115115
try {
116116
while((read_length=ifs.read(&buffer[0], buffer_size).gcount())>0) {

0 commit comments

Comments
 (0)