Sign in to follow this  

redefinition different basic types

Recommended Posts

Hi I haven't been programming for a while now(my graphiccard just crashed :( ) and now i extended my vertex-class but atm i'm not even able to add an empty function to that class. I think it's something very simple(because of the lack of training recently) but i just can't find the error. ngVertex.h:(i deleted all outcommented parts)
#pragma once
#include <windows.h>
#include "ngVector3.h"
#include "ngVector2.h"
#include "ngUnknown.h"
#include <vector>
class ngVertex : public ngUnknown
	void* vertexptr;
	DWORD fvf;
	void create(DWORD fvf);
	void release();


#include ".\ngvertex.h"
#include <d3dx9.h>



void ngVertex::create(DWORD fvf)

void ngVertex::release()

and the part where i use the class:
#include "ngVertex.h"

ngVertex vertEx;


and the errors: f:\Programmiertes\nGin\nGin.cpp(24): error C2143: syntax error : missing ';' before '.' f:\Programmiertes\nGin\nGin.cpp(24): error C2371: 'vertEx' : redefinition; different basic types f:\Programmiertes\nGin\nGin.cpp(24): error C2501: 'vertEx' : missing storage-class or type specifiers regards, m4gnus

Share this post

Link to post
Share on other sites
You can't call member functions on objects in namespace scope. If you want to call vertEx.create() you need to do it inside of a function.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this