Search:

Type: Posts; User: ninja

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    1,447

    Just noted another thing that makes it even...

    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...
  2. Replies
    7
    Views
    1,447

    Well... All of the header files are included....

    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...
  3. Replies
    7
    Views
    1,447

    Sorry, I forgot to specify where the errors...

    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...
  4. Replies
    7
    Views
    1,447

    Wierd compiler error.

    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:
    ...
  5. Replies
    14
    Views
    1,831

    I don't know,

    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...
  6. Replies
    14
    Views
    1,831

    What's the problem?

    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...
  7. Replies
    1
    Views
    1,015

    Check out the faq...

    here: http://www.cprogramming.com/boardfaq.html#execs
  8. Thread: infinity

    by ninja
    Replies
    10
    Views
    5,020

    Are you sure you must use it (infinity)?

    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...
  9. Replies
    2
    Views
    2,024

    That is very simple coding...

    ihave+=money;
    ihave-=lost;

    As simple as that.
  10. Replies
    3
    Views
    1,012

    Damn!

    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...
  11. Replies
    3
    Views
    1,012

    I think...

    ...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...
  12. Thread: Little Help

    by ninja
    Replies
    10
    Views
    1,555

    Well,

    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...
  13. Replies
    3
    Views
    1,012

    Just a question...

    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...
  14. Replies
    4
    Views
    1,059

    Well...

    ...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...
  15. Replies
    8
    Views
    9,442

    (edited)

    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...
  16. Replies
    8
    Views
    9,442

    No, my code works perfectly

    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,...
  17. Replies
    8
    Views
    9,442

    I'll give you a hint

    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')
  18. Thread: interrupt

    by ninja
    Replies
    4
    Views
    2,972

    Thanks for the info!

    I´ll check it out...
  19. Thread: this?

    by ninja
    Replies
    5
    Views
    951

    OK, thanks!

    I´ll try...
  20. Thread: this?

    by ninja
    Replies
    5
    Views
    951

    I´ve really tried to understand this...

    ...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?...
  21. Thread: interrupt

    by ninja
    Replies
    4
    Views
    2,972

    Neither works for me...

    If I use the assembly code, it compiles but when run, crashes. The other code doesn´t compile.
    (using msvc++)
  22. Thread: this?

    by ninja
    Replies
    5
    Views
    951

    And what does that mean?

    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...
  23. Well...

    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...
  24. Thread: this?

    by ninja
    Replies
    5
    Views
    951

    this?

    I have a question about the following code:



    Class Node
    {
    public:
    Node *next;
    int data;
    Node(){ next = 0, data = 0;} //...constructor...
  25. I´ve tried to modify my code to what was suggested,

    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...
Results 1 to 25 of 30
Page 1 of 2 1 2