13 Solved Topics

Remove Filter
Member Avatar for CoolGamer48

Hey, I download DarkGDK for Visual C++ 2008 Express (also downloading the correct version of the Direct X SDK). I just saved the SDK in some random directory, so when I try to execute the test code, i get an error telling me d3dx9.h can't be found. So, where do …

Member Avatar for Sepiantum
0
496
Member Avatar for CoolGamer48

Hey, I've been trying to create an RPG, and I really have trouble moving with it. I really can't find any decent tutorials (or even books). The only book I've heard of (Making RPGs with DirectX, or something, by Jim Adams) got pretty bad reviews. The part I can't really …

Member Avatar for Ezzaral
0
866
Member Avatar for CoolGamer48

I'm writing a program for a contest (it's a demo, not the actual thing - so I'm not cheating by asking for help - and my question isn't directly related to the algorithm they want anyway). To submit a program, you send them the .cpp file, and they execute it …

Member Avatar for CoolGamer48
1
135
Member Avatar for CoolGamer48

I'm having problems creating an array with a dynamic size using new. Here is the relevant code: [CODE] enum LandCondition { Bad, Good }; //... int IMG_WIDTH, IMG_HEIGHT; LandCondition* land; //... land = new LandCondition[IMG_WIDTH][IMG_HEIGHT];//causes errors [/CODE] The errors VC++ gives me are: error C2540: non-constant expression as array bound …

Member Avatar for CoolGamer48
0
110
Member Avatar for CoolGamer48

To my understanding, certain classes, like ifstream, have a conversion to a primitive data type, like bool. In other words, you can do this: [CODE] if((fin >> x) && done == false) //... [/CODE] Now, does this simply work because ifstream has the && operator overloaded, or can objects of …

Member Avatar for Prabakar
0
92
Member Avatar for CoolGamer48

Say I have a file file1.h: [CODE] namespace a { int Func() { return 5; } } [/CODE] and a file file2.h [CODE] #include "file1.h" namespace a { class Foo { Foo(); }; } [/CODE] and file2.cpp: [CODE] #include "file2.h" a::Foo::Foo() { Func();//<---- } [/CODE] Can Func() be referenced like …

Member Avatar for CoolGamer48
0
81
Member Avatar for CoolGamer48

Ok, I'm writing a simple program with VC++ and DirectX. It's basically a working framework for 3D games, but all I need it to do right now is load a mesh and display it, and it is killing me. I've done this successfully before, I don't know why its not …

Member Avatar for MattEvans
0
453
Member Avatar for CoolGamer48

Hey, am I correct in assuming that when you declare a function virtual in a prototype, it is illegal to use the virtual keyword again when you define the function?

Member Avatar for Prabakar
0
53
Member Avatar for CoolGamer48

Hey, I keep getting this error: error LNK2019: unresolved external symbol "public: struct IDirect3DDevice9 * __thiscall Engine::GetDevice(void)" when I try to compile my project. MSDN says that IDirect3DDevice9 uses d3d9.lib, but it still won't work even with that lib in additional dependencies. (using VC++ 2008) I tried linking to a …

Member Avatar for CoolGamer48
0
126
Member Avatar for CoolGamer48

Is there any reason why the code below won't work (I mean as far as writing output to file, not as far as writing the correct output to the file): [CODE] #include <cstdio> #include <iostream> #include <fstream> using namespace std; int main() { ofstream fout ("ride.out"); ifstream fin ("ride.in"); char …

Member Avatar for Ancient Dragon
0
289
Member Avatar for CoolGamer48
Member Avatar for CoolGamer48

Hey, I'm trying to use trig to create a rotating tank (you rotate the tank by pressing left and right, and move forward and back by using up and down). I'm using this formula (C++): [CODE] tank.movex = cos(tank.direction*0.0174532925)*tank.move; tank.movey = sin(tank.direction*0.0174532925)*tank.move; tank.x += tank.movex; tank.y += tank.movey;[/CODE] tank.move is …

Member Avatar for CoolGamer48
0
105
Member Avatar for CoolGamer48

Hey, I'm trying to learn DirectX from this book ([I]Beginning Game Design[/I] by John S. Harbour, if anyone knows the book). I keep getting a LNK2019 error because [ICODE]Direct3DCreate9(D3D_SDK_VERSION)[/ICODE] is an "unresolved external symbol". Based on my slightly limited knowledge on libraries and include files and a little of my …

Member Avatar for CoolGamer48
0
167

The End.