Search:

Type: Posts; User: DarrenY

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    10,384

    Thanks for the link, my mind must've slipped as...

    Thanks for the link, my mind must've slipped as this could also be done.



    float k = (rand()%10);
    k = k/10;
  2. Replies
    7
    Views
    10,384

    rand() in decimals.

    Hi, I'm wondering how do I generate random numbers in decimals?
    Meaning between 0-1.

    Any ideas? rand() returns from the minimum of 1.
  3. Replies
    12
    Views
    1,726

    But my Base class is an abstract class which is a...

    But my Base class is an abstract class which is a .h file. Where do you recommend me to put the operator?
  4. Replies
    7
    Views
    1,921

    Thanks alot. I kind of manage to implement it in...

    Thanks alot. I kind of manage to implement it in my work.
  5. Replies
    12
    Views
    1,726

    So do I put the operator overloading in the base...

    So do I put the operator overloading in the base class or on the derived classes?

    *EDIT
    Apparently, it clashed with my other display functions from the same objects, or so I thought.


    ...
  6. Replies
    7
    Views
    1,921

    *EDIT So its like class base { ...

    *EDIT
    So its like



    class base
    {
    public:
    virtual ~base();
    };
  7. Replies
    7
    Views
    1,921

    Destructors error

    Hi, I'm having trouble with the destructors of a derived class from a base class, here are the codes

    Base Class of Asteroid.h


    #ifndef ASTEROID_H
    #define ASTEROID_H
    #include <QPainter>
    ...
  8. Replies
    12
    Views
    1,726

    Thanks for the advice but I'm sorry, I find it...

    Thanks for the advice but I'm sorry, I find it this quite hard to swallow. My current work now is to analyze various data storages and std::list is one of them.

    My object classes are derived from...
  9. Replies
    12
    Views
    1,726

    Is it possible if I can grab the head pointer of...

    Is it possible if I can grab the head pointer of the list and craft my own display list instead of using the template, this of course is a more targetive approach? If possible, what do you recommend...
  10. Replies
    12
    Views
    1,726

    Custom Template

    Hi,

    I'm new to this so I'm going to be direct. I'm having trouble with custom template of a Linked List. I've created a Linked List with a reference from a book but I'm at a lost when I store in...
  11. Replies
    3
    Views
    6,643

    Thanks alot! I'm sorry about my unnessary...

    Thanks alot! I'm sorry about my unnessary includes because my assignment happened to be so large I sometimes get really messed up. Its the first time I'm doing C++.

    Thanks ZuK and Desolation!
  12. Replies
    3
    Views
    6,643

    does not name a type ERROR

    Hi,

    I'm having trouble compiling, after writting a few lines of code, suddenly my compiler throws me an error. The error is :

    GameWorld.h:38: error: ‘AsteroidList’ does not name a type
    ...
  13. Replies
    6
    Views
    13,529

    Class not declared in the scope

    Hi,

    I'm running into trouble here as I'm programming C++ with QT4.3.

    Here's a snippet


    #Asteroid.h
    #ifndef ASTEROID_H
    #define ASTEROID_H
  14. Replies
    9
    Views
    21,220

    Thank you, by doing that, it showed me something...

    Thank you, by doing that, it showed me something new towards debugging it. It seems that my integer somehow jumped above the buffer I specified. I've made a few more changes but still doesn't solve...
  15. Replies
    9
    Views
    21,220

    to get my buffer limit which is a pre-requisite...

    to get my buffer limit which is a pre-requisite to my project. I could just easily have



    buffer_size = atoi(argv[2]);


    I've made some changes to my first post and posted another problem...
  16. Replies
    9
    Views
    21,220

    My apologies, I have found my problem, at ...

    My apologies, I have found my problem, at



    strcpy(tempBuffer_size,argv[2]);
    buffer_size = atoi(tempBuffer_size);
    temp_buf = buffer_size - 1;
  17. Replies
    9
    Views
    21,220

    When I run the gdb debugger, I has this ...

    When I run the gdb debugger, I has this

    Program received signal SIGFPE, Arithmetic exception.
    0xff2a3120 in .rem () from /lib/libc.so.1

    But it didn't point me where is it.
  18. Replies
    9
    Views
    21,220

    Floating Exception (Core Dumped)

    Hi, I'm having a problem with my program, whenever I try to run it, it gave me a Floating Exception (Core Dumped), here's the code :



    #include <stdio.h>
    #include <stdlib.h>
    #include...
  19. Replies
    1
    Views
    4,024

    I'm still unable to figure out why did a...

    I'm still unable to figure out why did a duplicate copy entered my first record. Any ideas?

    This is my output in strings


    Output :

    Record1 :
    Timmy...............
    John................
  20. Replies
    1
    Views
    4,024

    Duplicate at Hash Table

    Hi, I'm running in a little trouble here. I have a hash functions which hashes a string into a hash table that is linked via linked list. It seems to produce duplicates in my node. Here are pieces of...
  21. Replies
    4
    Views
    1,593

    I see..thanks Salem!

    I see..thanks Salem!
  22. Replies
    4
    Views
    1,593

    I can't really post any codes, from what I...

    I can't really post any codes, from what I understand from the quote, I tried using printf, fprintf with or without the flag, it still prints both strings.

    E.G.

    ./sample -d

    All I did was a...
  23. Replies
    4
    Views
    1,593

    Optional flag in commandline

    Hi, I've been googling through the internet trying to find articles and sample on the optional flag in commandline argument. I was hoping someone could point me to the right direction for the...
  24. Replies
    2
    Views
    5,961

    Its in C#. I'm relatively new in C#, perhaps its...

    Its in C#. I'm relatively new in C#, perhaps its because of the size I've declared? What should I do to overcome this? I thought that


    line.Length


    on the for loop would just traverse until...
  25. Replies
    2
    Views
    5,961

    File I/O Encode & Decode with XOR

    Hi, I wrote 2 programs which encodes and decodes a text file. Upon decoding, it decoded my original text but also added something extra. Here is my piece of code, could anyone kindly explain this...
Results 1 to 25 of 54
Page 1 of 3 1 2 3