|
Some recent topics started on our forums |
Code design in C++
|
First off, I have been programming in C++ for some time, but not really in the right way... so what I'm trying to do right now is to learn OO programing, as oposed to "C with classes".
Basically I have a c_bitmap class that is a fancy array of the... |
Posted October 2, 2007 9:41:14 PM
|
iteration statements, control flow
|
The iteration statements are discussed in the page 79 of book zero. I have some doubts about them (I've had them since C++ actually)...
First of, is there some way to get out of two nested loops without a goto? Something like break, but break ... |
Posted July 25, 2007 7:30:25 AM
|
on 3.5.2 - Accessibility domains
|
It is said in the end that, although a class inherits the private members from it's base, it cannot access them. Then it proceeds with the following example:
class A
{
int x;
static void F(B b) {
b.x = 1; // Ok
}
}
class B: A
{
s... |
Posted July 19, 2007 11:08:13 PM
|
Division by zero (C++)
|
Basically, I have a and b (floats), I add them up and divide by zero - that's c (float). Now, I tell std::cout to print c and it prints 1.#INF
Ok, here is my code:
#include <iostream>
int main()
{
float a;
float b;
float c;
std:... |
Posted May 14, 2007 7:53:20 PM
|
Direct3D: drawing far things on top of near things
|
So, I'm building my program on top of the Tutorial3 (called Matrices) of the DirectX 9.0 SDK (in Visual C plusplus 8).
Basically, what I did was replace the spinning triangle with a cube - it worked OK. But then I wanted to build a function t... |
Posted May 1, 2007 11:23:40 PM
|
DirectX SDK (December2006) on windowsXP
|
As far as I know, this Version uses DirectX10. Problem is that it doesen't work on WindowsXP, only in Vista, right? Basically, I'm thinking about uninstalling it and downgrading to the DirectX9.0 SDK. However, as my SDK version is working j... |
Posted April 29, 2007 10:32:46 PM
|
Algorithm for best choice - with pointer
|
Ok, first of all, this is C++.
Basically, I have a class called c_city, that has a vector member of pointers to my class c_travel. Now, I want to pick the cheapest travel, but also a travel for a city that I haven't visited yet. The code I have so... |
Posted January 23, 2007 1:49:00 PM
|
copying a class in c++
|
EDIT: I'm starting to think that the problem is actually with the c_player::AddPiece function (the last one in this post). It's a very short function, could someone take a look and tell me if it's unsafe?
Ok, basically I want to copy my c_ma... |
Posted January 14, 2007 3:19:04 PM
|
linking a library in VC++
|
Ok, so how do I link a library in VC++? I've searched the project properties, but it's full of options I have no idea about. The help file is telling me the difference between implicit and explicit linking (I'm trying to link to lglut.lib, so I'm ass... |
Posted January 15, 2007 3:20:31 PM
|
C++ OO problems when trying to make AI
|
Basically, the AI of my game is made by an AI class and a possibility class.
Each possibility has a map built-in, as well as an std::vector of possibilities.
So, when my AI class calls the first possibility, it will build all the possibilities tree... |
Posted January 11, 2007 5:42:21 PM
|
View All Topics Started By This User
|
|
Some recent replies made on our forums |
Game economy
|
Are you familiar with the game golemizer? (www.golemizer.com)
In essence, it is a morpg with a player guided economy. The economy of the game is somewhat complex, and you can only get the raw materials from the world... everything else must b... |
Posted September 13, 2009 12:14:58 AM
|
C++ Vector problem
|
As far as I know, when you call siSprite=m_vSprites.erase(siSprite); the vector might be reallocated, so it makes your iterator no longer valid. Actually, why do you have the 'siSprite=' part in that expression? I'm not sure what that part is doing,... |
Posted February 24, 2008 2:02:06 PM
|
I want YOU to suggest content for the FAQ
|
Well, this is a link that helped me get started, when trying to develop to the Palm (Garnet OS):
ACCESS - Getting started
The site is a little complicated to navigate, but it has all the resources spread around. |
Posted February 18, 2008 12:06:38 PM
|
Problems with C++ UT Simulation Program
|
One thing I noticed is that there isn't any kind of output calls in theGame.play() (you know, functions like cout, that print things on the screen). So how do you know that the function is being skiped? Unless the Player functions do something,... |
Posted December 23, 2007 7:30:03 AM
|
making a c function
|
Ok, but is there any particular reason why you moved to C?
The problem is that you are using a "char*" as if it were a complete string class. It is not, it's just a pointer to an array of chars.
Anyway, the simpler way to make this work is to mak... |
Posted November 15, 2007 11:14:18 AM
|
making a c function
|
Before I answer, is there any particular reason you are using the C language? I ask it because you seem to be having quite a hard time dealing with strings at C. Take your patient_string array for instance. You are initializing each element as a "h"... |
Posted November 15, 2007 8:53:32 AM
|
Squareroot trouble
|
Well, by using double you get a good precision, I just don't know how to make std::cout show you the number with more digits after the dot. Even then, this is probably not as much as you want, but then I don't know how to make it...
Also, I was pl... |
Posted October 16, 2007 2:07:25 PM
|
Squareroot trouble
|
I haven't tested yet, but it looks like that, when you exit your first while loop, Under*Under is now bigger then Number, while Over*Over is smaller then the number. I guess that you will have to swap their values, so that in the next iteration of do... |
Posted October 16, 2007 1:33:53 PM
|
Code design in C++
|
Well, thank you all for the answers! I don't have a very good idea for what I'm going to make right now (some non-related boring work that I have to do first is keeping me busy), but at least I have a better idea for what not to do. Actually, I'm thi... |
Posted October 3, 2007 7:50:25 PM
|
My game just went live -- giving away Game Maker + Civ 4
|
Hey Kirby, I just saw that you have started the SpaceBall beta... congratulations. I haven't played much, but I noticed that the sound effects are a lot better now! |
Posted August 9, 2007 2:44:38 PM
|
View All Replies Made By This User
|