You want a pointer to a pointer?
int* p = new int;
int** pp = &p;
Then pp contains the address of the pointer p.
Type: Posts; User: Ushakal
You want a pointer to a pointer?
int* p = new int;
int** pp = &p;
Then pp contains the address of the pointer p.
manasij is right, you can't assign a non-static member function to a function pointer. The code manasij posted would work if the member function foo() was made static (i.e., "static void foo();").
The language it was coded in was almost certainly C and/or C++.
The original developer, Jonathan Blow, developed the game for Xbox 360's Xbox LIVE Arcade and Windows. As far as I know, he did all...
I thought Mac developers tended to use Objective-C rather than C++, but I'm not sure.
I think most people on these forums use a Linux and/or Windows environment, but you'll be able to find help...
There's really nothing wrong with using C#/XNA to program games; the slight performance disadvantages over C/C++ with DirectX/OpenGL will generally not be a problem unless you're doing some really...
Why not try putting the SYSTEMs in an std::map instead of an std::vector? Then you can have a function to get a specific system from a key, like so:
enum SysID
{
Input,
Graphics,
...
All you need to do is delete the extra white space in front of the braces using backspace or delete. It's just a text editor, and the white spaces are just tabs. It's simple enough to correct the...
How do you mean they don't close properly? If it's just indentation you can simply delete the white space in front of the braces at the end until they align properly. Does the code compile and run?
...
First of all, it wont compile: it's std::cout (or you can put "using namespace std;" after the include) and you should be including <iostream>, not <iostream.h>.
I'm not going to tell you the...
Thanks. :D
Can you point me in the direction of any decent articles about memory paging? I know it's wrong, I just don't know why. What are the consequences of a page fault and why do they occur? Are there any...
You might want to post questions specifically about Windows programming in the Windows programming section of the forum (Windows Programming), but I'll try to help.
You can't pass a WndProc...
Like I said, the code I posted isn't meant to be a real world implementation; it's simply an example of what I mean (and the actual amount of memory allocated isn't of importance right now). I want...
I recently discovered that dynamic memory allocation is pretty slow, so I've been thinking of a way to get around that. I've been thinking about going into low level video game engine programming...
This isn't a problem with inclusion guards, though it's a good idea to have them anyway. The problem is that you're "redefining" your class in the .cpp file. You should remove the public/private...
Have you made any attempt to do it yourself? If so, please show us some code so we can help you.
This code appears to be riddled with issues, but you haven't specified the exact problem you're having (do you get any compiler/linker errors?) and you haven't posted all the code, so there could be...
Have you tried sending "56:00:26:00" as a C-style string?
Ah, I see. Thanks for the info.
Yeah, sorry, my mistake.
Thanks for the article; it was very informative, thanks. I only just stopped using system("PAUSE") a few days ago myself, after...
The problem is in the function calcSubtotal:
float calcSubtotal (float installation, int discount, float& discountamount)
{
discountamount = installation * (discount / 100);
return...
You can do something like:
cin.ignore(cin.rdbuf()->in_avail);
rdbuf returns a pointer to the underlying stream buffer, and in_avail returns the number of characters available to read. That...
Yeah, sorry, I tried to edit out before anyone read it. :P I tested it myself and it seemed to work (and you're right, of course, about initialising count to 0). I didn't realise it would work like...
cin.ignore(), or istream::ignore(streamsize, int), discards all the characters in the cin stream until it has discarded the amount of characters specified by the first argument(in this case, 1000),...
Have you recompiled the program since making the changes?
I see. Alright, thanks.