Lesson 8 issue

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Mettler
Posts: 2
Joined: April 5th, 2012, 11:47 pm

Lesson 8 issue

Post by Mettler » April 5th, 2012, 11:58 pm

Everything was all peachy up until creating the user function. I moved on and watch how the code went, and from what I could tell I had everything Chili had. Right now I have in Game.h
"void DrawFace( int x, int y );"
Under the "User Function" Defined area.

As well I have
"void Game::DrawFace( int x, int y );
{
face code
} "



The Problem:
When I compile/run I get
"1>------ Build started: Project: Chili DirectX Framework, Configuration: Release Win32 ------
1> Game.cpp
1>..\Assets\Game.cpp(35): error C2761: 'void Game::DrawFace(int,int)' : member function redeclaration not allowed
1>..\Assets\Game.cpp(36): error C2447: '{' : missing function header (old-style formal list?)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========="

And in Game.cpp "void Game::DrawFace" the DrawFace has a red squiggly line underneath it.
I see that it says '{' missing function header But I dont see how that is missing.
Also I don't understand how its re-declaring the member function. :oops:

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Lesson 8 issue

Post by chili » April 6th, 2012, 3:57 am

Mettler wrote:As well I have
"void Game::DrawFace( int x, int y );
{
face code
} "
Lose the semicolon after DrawFace( int x, int y ) bro!
Chili

Mettler
Posts: 2
Joined: April 5th, 2012, 11:47 pm

Re: Lesson 8 issue

Post by Mettler » April 6th, 2012, 4:53 am

seems my issue is using ; to much! D;

Post Reply