Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c4da2f5

Browse files
committed
Fix missing cstdlib include
1 parent 3354837 commit c4da2f5

29 files changed

Lines changed: 31 additions & 1 deletion

03_Drawing_a_triangle/00_Setup/00_Base_code.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ from scratch with the following code:
1010
#include <iostream>
1111
#include <stdexcept>
1212
#include <functional>
13+
#include <cstdlib>
1314

1415
class HelloTriangleApplication {
1516
public:
@@ -50,7 +51,8 @@ int main() {
5051
We first include the Vulkan header from the LunarG SDK, which provides the
5152
functions, structures and enumerations. The `stdexcept` and `iostream` headers
5253
are included for reporting and propagating errors. The `functional` headers will
53-
be used for a lambda functions in the resource management section.
54+
be used for a lambda functions in the resource management section. The `cstdlib`
55+
header provides the `EXIT_SUCCESS` and `EXIT_FAILURE` macros.
5456

5557
The program itself is wrapped into a class where we'll store the Vulkan objects
5658
as private class members and add functions to initiate each of them, which will

code/00_base_code.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <iostream>
55
#include <stdexcept>
6+
#include <cstdlib>
67

78
const int WIDTH = 800;
89
const int HEIGHT = 600;

code/01_instance_creation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <iostream>
55
#include <stdexcept>
6+
#include <cstdlib>
67

78
const int WIDTH = 800;
89
const int HEIGHT = 600;

code/02_validation_layers.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <stdexcept>
66
#include <vector>
77
#include <cstring>
8+
#include <cstdlib>
89

910
const int WIDTH = 800;
1011
const int HEIGHT = 600;

code/03_physical_device_selection.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <stdexcept>
66
#include <vector>
77
#include <cstring>
8+
#include <cstdlib>
89

910
const int WIDTH = 800;
1011
const int HEIGHT = 600;

code/04_logical_device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <stdexcept>
66
#include <vector>
77
#include <cstring>
8+
#include <cstdlib>
89

910
const int WIDTH = 800;
1011
const int HEIGHT = 600;

code/05_window_surface.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <stdexcept>
66
#include <vector>
77
#include <cstring>
8+
#include <cstdlib>
89
#include <set>
910

1011
const int WIDTH = 800;

code/06_swap_chain_creation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <algorithm>
77
#include <vector>
88
#include <cstring>
9+
#include <cstdlib>
910
#include <set>
1011

1112
const int WIDTH = 800;

code/07_image_views.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <algorithm>
77
#include <vector>
88
#include <cstring>
9+
#include <cstdlib>
910
#include <set>
1011

1112
const int WIDTH = 800;

code/08_graphics_pipeline.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <algorithm>
77
#include <vector>
88
#include <cstring>
9+
#include <cstdlib>
910
#include <set>
1011

1112
const int WIDTH = 800;

0 commit comments

Comments
 (0)