Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3046

pointer type error

$
0
0
Does anyone know why this isn't building?

Code:

#include <Windows.h>
#include <gl/glut.h>


void display()
{
        glClear(GL_COLOR_BUFFER_BIT);
        glBegin(GL_TRIANGLES);
        glVertex2f(-0.5f, -0.5f);
        glVertex2f(0.5f, -0.5f);
        glVertex2f(0.0f, 0.5f);
        glEnd();
        glFlush();
}

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
        glutInit(&argc, argv);
        glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
        glutInitWindowSize(500, 500);
        glutCreateWindow("OpenGL Test");
        glutDisplayFunc(display);
        glutMainLoop();
        return 0;
}

When building I get 3 error(s).

Code:

argument of type "char *" is incompatible with parameter of type "char **"
expected an expression
subscript requires array or pointer type
expected an expression before ']'

In the project settings I set the Linker -> System -> SUBSYSYSTEM:Windows

Viewing all articles
Browse latest Browse all 3046

Trending Articles