【发布时间】:2022-11-01 14:16:26
【问题描述】:
Not sure what I am doing wrong.. I have a very muddy idea of how Constructors should be formatted or structured, so any insights would help!
Renderer.h
#pragma once
#include <afxwin.h>
#include <winapifamily.h>
#include <wtypes.h>
#include <gdiplus.h>
class Renderer
{
public:
Renderer();
~Renderer();
void Clear(Gdiplus::Color clearColor);
virtual void Free() = 0;
virtual void LoadFace(int index, char* path) = 0;
void InitFromHDC(HDC dc);
void Shutdown();
// Drawing surface
Gdiplus::Graphics _graphics;
受保护:
私人的:
bool _gdiplusActive;
};
渲染器.cpp
渲染器::渲染器() : _gdiplusActive(假) { // <-错误在这里 }
渲染器::~渲染器() {}
...
我尝试了许多添加变量的变体......但老实说,错误可能很明显,谁了解默认构造函数是什么。我不知道。
【问题讨论】:
标签: constructor gdi+