KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
So here is the error: 1>c:\users\ben\documents\visual studio 2010\projects\opengl_learning\opengl_learning_without_glut\openglcontext.cpp(18): error C2533: 'OpenGLContext::{ctor}' : constructors not allowed a return type And here is a block of code where the error points, specifically the error originates from the default constructor: #include <Windows.h> #include <iostream> #include "OpenGLContext.h" /** Default constructor for the OpenGLContext class. At this stage it does nothing but you can put anything you want here. */ OpenGLContext::OpenGLContext(void){} OpenGLContext::OpenGLContext(HWND hwnd) { createContext(hwnd); } /** Destructor for our OpenGLContext class which will clean up our rendering context and release the device context from the current window. */ OpenGLContext::~OpenGLContext(void) { wglMakeCurrent(hdc, 0); // Remove the rendering context from our device context wglDeleteContext(hrc); // Delete our rendering context ReleaseDC(hwnd, hdc); // Release the device context from our window } Why!?
Tags (comma-separated)
Save Edits
Cancel