Archived

This topic is now archived and is closed to further replies.

fireking

damnit... first road block in the journey to d3d glory

Recommended Posts

d:\computer\mydocuments\Visual Studio Projects\testd3d\main.cpp(4): error C2259: 'IDirect3D8' : cannot instantiate abstract class
< main.h >
#ifndef MAIN_H
#define MAIN_H

#include <windows.h>
#include <stdio.h>
#include <d3d8.h>

#include "capplication.h"

#pragma comment(lib,"d3d8.lib")

#endif
 
< main.cpp >
#include "main.h"

cApplication myapp;
IDirect3D8 d3d;

bool keys[256];

bool Init();
bool Frame();
bool Shutdown();
...
...
 
and yes, i copied d3d8.h *types and *caps files into my project directory (added to the solution as well) im using empty win32 project in microsoft visual studio .net visual C++ [edited by - fireking on October 15, 2003 12:08:41 AM]

Share this post


Link to post
Share on other sites
There''s also #defines for these interfaces like:
#define IDirect3D8* LPDIRECT3D9
#define IDirect3DDevice9 LPDIRECT3DDEVICE9
etc.

in case you didn''t know. Its all preference.

ATS

Share this post


Link to post
Share on other sites
"wow, i smell a misprint in this book "

Yeah, I was reading through the Role Playing Games book and was impressed by this little gem on page 405:

if((m_Name = new char[10]) == NULL)
strcpy(m_Name, "Jim Adams");
else return FALSE;



[edited by - Igilima on October 16, 2003 2:50:19 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by drewslater
There''s also #defines for these interfaces like:
#define IDirect3D8* LPDIRECT3D9
#define IDirect3DDevice9 LPDIRECT3DDEVICE9
etc.

in case you didn''t know. Its all preference.

ATS


#define IDirect3DDevice9* LPDIRECT3DDEVICE9

This should actually be a pointer. And I, personally, prefer the Ixxx* style more than the LPxxx style.

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..

Share this post


Link to post
Share on other sites