What is wrong with following which causes compiler error

#1

After nailing through the first example in the vulkan tutorial, I came across the second example below and immediately ran into compiler error, anyone can guess what is wrong?
(compile errors will be / are attached at the bottom)

#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
//#include <vulkan/vulkan.h>

#include <iostream>
#include <stdexcept>
#include <functional>
#include <cstdlib>

void HelloTriangleApplication::initWindow() {
        glfwInit();
        glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
        glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
        window = glfwCreateWindow(WIDTH, HEIGHT, "Vulkan", nullptr,
        nullptr);
}

void HelloTriangleApplication::mainLoop() {
        while (!glfwWindowShouldClose(window)) {
                glfwPollEvents();
        }
}

void HelloTriangleApplication::cleanup() {
        glfwDestroyWindow(window);
        glfwTerminate();
}

void HelloTriangleApplication::initVulkan() {
        createInstance();
}

void createInstance() {
        VkApplicationInfo appInfo = {};
        appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
        appInfo.pApplicationName = "Hello Triangle";
        appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);
        appInfo.pEngineName = "No Engine";
        appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0);
        appInfo.apiVersion = VK_API_VERSION_1_0;

        VkInstanceCreateInfo createInfo = {};
        createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
        createInfo.pApplicationInfo = &appInfo;

        uint32_t glfwExtensionCount = 0;
        const char** glfwExtensions;

        glfwExtensions = glfwGetRequiredInstanceExtensions(&glfwExtensionCount);

        createInfo.enabledExtensionCount = glfwExtensionCount;
        createInfo.ppEnabledExtensionNames = glfwExtensions;

        createInfo.enabledLayerCount = 0;
        //VkResult result = vkCreateInstance(&createInfo, nullptr, &instance);

        if (vkCreateInstance(&createInfo, nullptr, &instance) != VK_SUCCESS)
        {
                throw std::runtime_error("failed to create instance!");
        }

        uint32_t extensionCount = 0;
        vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr);
        std::vector<VkExtensionProperties> extensions(extensionCount);

        vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, extensions.data());

        std::cout << "available extensions:" << std::endl;

        for (const auto& extension : extensions) {
                std::cout << "\t" << extension.extensionName << std::endl;
        }
}

class HelloTriangleApplication {
        public:
        void run()      {
                initWindow();
                initVulkan();
                mainLoop();
                cleanup();
        }

        private:
        VkInstance instance;

        void initVulkan() {
                createInstance();
        }

        void mainLoop() {
        }

        void cleanup() {
                vkDestroyInstance(instance, nullptr);
                glfwDestroyWindow(window);
                glfwTerminate();
        }

};

int main()
{
        HelloTriangleApplication app;

        try
        {
                app.run();
        } catch (const std::exception& e)
        {
                std::cerr << e.what() << std::endl;
                return EXIT_FAILURE;
        }
        return EXIT_SUCCESS;
}
Post removed, can not contact mod?