Help please!

Can someone please help me? I recently started "advanced" c++.
Can someone help me with my problem?
Expected initializer before 'float'
can you fix the problem? or tell me hwo to fix it

#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
float veritces;
float vertices[] = {
0.0f, 0.5f, // Vertex 1 (X, Y)
0.5f, -0.5f, // Vertex 2 (X, Y)
-0.5f, -0.5f // Vertex 3 (X, Y)
};
Last edited on
different data types with same ID? this is not possible in C++.

Aceix.
If that is the exact code you are missing curly braces around Main
closed account (j3Rz8vqX)
I may be taking this the wrong way, but either it is a prototype or a function/method header:
1
2
3
4
5
6
7
8
9
10
#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{//This Was Missing?
    float veritces;
    float vertices[] = {
        0.0f, 0.5f, // Vertex 1 (X, Y)
        0.5f, -0.5f, // Vertex 2 (X, Y)
        -0.5f, -0.5f // Vertex 3 (X, Y)
    };
}//This Was Missing? 

My bet's on header of a function.
Last edited on
Topic archived. No new replies allowed.