Just noted another thing that makes it even weirder: I can use anything else that were declared and defined in that header with no errors at all. Logically that would mean that there's something...
Type: Posts; User: ninja
Just noted another thing that makes it even weirder: I can use anything else that were declared and defined in that header with no errors at all. Logically that would mean that there's something...
Well... All of the header files are included. I've checked that countless of times. Besides I get an error if creating a polygon in the same header that "polygon" is in. And in it's cpp. I've even...
Sorry, I forgot to specify where the errors occured...
They all occur where I refer to "Polygon". No matter what way or where that happens.
There's nothing wrong with the array, as I would...
I've been working on a project for a while now and everything's been working fine until I added one last class, at which point I started to get the following errors:
...
but try to place the seed-code elsewhere. I've had the problems you're having and sometimes solved it by placing the seed somewhere else. Hope that helps...
Do you get a compiler error, does it not function properly or what? If the problem is that rand always gets the same numbers, then you need to seed it. If the problem is something else, you'll have...
here: http://www.cprogramming.com/boardfaq.html#execs
Post your code and what it's supposed to do and we'll check it out. I have a hard time figuring out what you'd need a variable equal to infinity for. Always try and find the simplest solution. It's...
ihave+=money;
ihave-=lost;
As simple as that.
I must really have been awfully sleepy when I wrote that code! I just noticed that I don't even add the nodes to the end of the list! Works perfectly now, so no need for more comments, unless you've...
...the code ought to be fairly simple to follow. It's not like there is that much of it. Anyone who knows his way around a linked list should understand it quite easily (at least I think so, unless...
that depends on what your function is supposed to do. You should always have main return an int (0 if everything is successfull).
Aside from that you have your function return whatever is needed. In...
As I was sitting around doing the usual code-thinking, I suddenly thought of a thing that sounded real cool. An array of linked lists. This was something I'd never tried or seen before, so I...
...from what I can see, the problems are these: pgh and mgh are only randomized once. They should be randomized every loop, lest the damage be the same every loop. And also, the health variables...
Sorry, didn't read your post to thoroughly. You're right.
That's what I get from being up to late... Please ignore the incorrect and weird facts of my posts. I removed the rest of the contents of...
I've tried and compiled it even. Used it quite extensively in various forms even.
getch() gets a char from the buffer (in this case, the key you pressed). And sure, pressed key is uninitialized,...
Try this code and see what it does, it may help you:
#include<stdio.h>
#include<conio.h>
int main()
{
char pressedkey;
while(pressedkey!='\r')
I´ll check it out...
I´ll try...
...but it seems none of the wensites I´ve visited can explain it understandably, and I can´t find anything about searching previous posts. Could someone here please assist me in learning about this?...
If I use the assembly code, it compiles but when run, crashes. The other code doesn´t compile.
(using msvc++)
What would be the particular instantiation of the class in this case? From what the code looks like I thought it would be like jumping to the beginning of the list, is that so? If not how would one...
Your code is a bit messy and some of the things look a bit weird. Here´s
what I´d use to do what you want (more or less the same code, but not as
messy):
#include <stdio.h>
#include...
I have a question about the following code:
Class Node
{
public:
Node *next;
int data;
Node(){ next = 0, data = 0;} //...constructor...
but the program crashes when I start it.
It uses a linked list successfully once, but then it isn´t reseted to the start when next I use it, so I get a nasty error where the program forever tries in...