- Viewing Profile: Reputation: ArthY303
Community Stats
- Group Members
- Active Posts 198
- Profile Views 2,042
- Member Title Member
- Age 23 years old
- Birthday March 3, 1990
-
Gender
Male
-
Location
Galati
User Tools
Latest Visitors
#4877899 Adding icon to my exe in Visual Studio 2008
Posted by ArthY303
on 28 October 2011 - 10:15 AM
#4853088 Funky std::ifstream behavior [C++]
Posted by ArthY303
on 23 August 2011 - 11:33 PM
Try it like this:
std::ifstream file(filepath, ios::binary);
I don't really know if this will help you but you can give it a try.
#4845551 To goto or not to goto?
Posted by ArthY303
on 06 August 2011 - 03:26 PM
#4841006 Trouble moving sprites
Posted by ArthY303
on 27 July 2011 - 02:44 AM
I'm not 100% sure what that "spriteField" is, but when it is what I think, say a List of all the sprites, then your for loop may be the problem.
Try :for ( int i = 0; i <= spriteField.size(); i++)
So it iterates correctly through all the Sprites, otherwise it will forget the last one. ( <= instead of <)
Hi! I don't think that is true. From 0 to < spriteField.size() there are n elements. From 0 to <= spriteField.size() the are n+1 elements. This means, there is one more sprite which he has not added in the vector. This should throw an index out of bounds exception.
#4840797 Debug and Release
Posted by ArthY303
on 26 July 2011 - 02:46 PM
#4840721 FPS GAMES SUCK!
Posted by ArthY303
on 26 July 2011 - 12:29 PM
#4840467 Debug and Release
Posted by ArthY303
on 26 July 2011 - 06:20 AM
#4838421 Functions and Variables (C++)
Posted by ArthY303
on 21 July 2011 - 06:59 AM
void timestepfoward(){
otherfactors();
cout << "\n\nIt is currently year " << currentyear << " and the population is " << initpop << ".\n";
cout << "How many years would you like to skip? ";
cin >> t;
population();
currentyear = t+currentyear;
cout << "\nIt is now year " << currentyear << " and the population is now " << newpopulation << ".\n";
newpopulation=initpop; // shouldn't this line be: initpop = newpopulation; ?
mysociety();
}
#4837911 error LNK2001: unresolved external symbol
Posted by ArthY303
on 20 July 2011 - 05:55 AM
D3DSURFACE_DESC is not a pointer, so you cannot set it to NULL. vertices is an array of structures, so you cannot set that to be NULL either.
You can use memset or ZeroMemory though on them. But you will have to do that in your Initialize()function.
#4837902 error LNK2001: unresolved external symbol
Posted by ArthY303
on 20 July 2011 - 05:46 AM
//You have to specify to which class surface belongs (i.e GraphicsEngine), you forgot to put that in your code. D3DSURFACE_DESC GraphicsEngine :: surface; // Put this line with the rest of the static members in your cpp file CUSTOMVERTEX GraphicsEngine :: vertices[4];
This will solve your errors.
#4837856 error LNK2001: unresolved external symbol
Posted by ArthY303
on 20 July 2011 - 03:08 AM
Try this: before the function: void GraphicsEngine::Initialize(HWND hWnd), you need to define those static member variables
#include <d3d9.h>
#include <d3dx9tex.h>
#include "GraphicsEngine.h"
#include "Main.h"
LPDIRECT3D9 GraphicsEngine :: d3d = NULL;
LPDIRECT3DDEVICE9 GraphicsEngine :: d3ddev = NULL;
LPDIRECT3DVERTEXBUFFER9 GraphicsEngine :: v_buffer = NULL;
IDirect3DTexture9* GraphicsEngine :: texture = NULL;
D3DSURFACE_DESC GraphicsEngine :: surface;
VOID* GraphicsEngine :: pVoid = NULL;
void GraphicsEngine::Initialize(HWND hWnd)
{
}
#4826289 Illegal use of type 'void'
Posted by ArthY303
on 22 June 2011 - 12:44 AM
public:
//basic functions
void handle_input;
void move;
void render;
These are supposed to be functions. However, you don't specify their prototypes completely. You need to add the parameter list. If the functions
don't have parameters, just add empty parentheses.
Like so:
public:
//basic functions
void handle_input();
void move();
void render();
- Home
- » Viewing Profile: Reputation: ArthY303

Find content