Search:

Type: Posts; User: Korhedron

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    1,028

    Choice of std:: Container

    Hello all,

    I'm trying to pin down the kind of container I need to select, and if there isn't one that works, to determine what I need to write my own that isn't too slow. Here are the requirements...
  2. Replies
    3
    Views
    1,195

    Thanks for the help, Salem. I've decided to...

    Thanks for the help, Salem.

    I've decided to use the following, though it's probably not optimal :


    ifstream fin;
    string myString;
    istringstream mySStream;
    list <double> myList; // List used...
  3. Replies
    3
    Views
    1,195

    Reading data file efficiently

    Hello,

    I'd like some advice on how to go about reading a data file efficiently - that is, with as little wasted operation as possible.

    The files I'm trying to read are in this format :


    #...
  4. Replies
    11
    Views
    7,048

    This is the last post I'll be making in this...

    This is the last post I'll be making in this thread, because you're not worth arguing with. Did I suggest something that would solve his problem ? Yes. Did you ? No.
  5. Replies
    11
    Views
    7,048

    *Sighs* I suggested a solution that would...

    *Sighs*

    I suggested a solution that would solve the OP's problems. I didn't tell him not to use Visual Studio. Actually, I used the words, "I suggest", while you, Elysia, told him he "should be...
  6. Replies
    6
    Views
    1,675

    I understand my error now - I wasn't...

    I understand my error now - I wasn't differentiating between objects and their instances. Thanks very much for the help !
  7. Replies
    6
    Views
    1,675

    It should be able to access protected members of...

    It should be able to access protected members of classes that it is derived from, not members on its same hierarchical level. So, it should have access to protected Paths objects, but not protected...
  8. Replies
    6
    Views
    1,675

    Hi anon, Given LanguagePaths inherits Paths,...

    Hi anon,

    Given LanguagePaths inherits Paths, surely it can access Paths' protected members ? That's the difference between private and protected. Am I wrong ?

    Thanks,
    Quentin
  9. Replies
    11
    Views
    7,048

    Some people will massacre me for saying this, but...

    Some people will massacre me for saying this, but I've never gotten along with Visual Studio. I suggest ( and people will massacre me for this too ) you try Code::Blocks. It's free and I've never had...
  10. Replies
    11
    Views
    7,048

    How are you using it ? This works for me : ...

    How are you using it ? This works for me :


    #include <cmath>
    #include <iostream>
    using namespace std;

    int main()
    {
    double x;
  11. Replies
    6
    Views
    1,675

    Accessing protected class members

    Hello,

    I have a base class Paths, and a derived class LanguagePaths, which inherits Paths. There are various members of Paths, namely two doubles and a std::list <int>, which I'd like to copy from...
  12. Replies
    10
    Views
    2,487

    Thanks very much, that works - though I've...

    Thanks very much, that works - though I've removed const keywords because, as you've realised, I'm not comfortable with them. The main issue was the way I was passing the PathCompare object to the...
  13. Replies
    10
    Views
    2,487

    laserlight, CornedBee, thanks for the help. I...

    laserlight, CornedBee, thanks for the help. I think I'm almost there, but still getting an error. I can't find a way to fix it. Any ideas would be really welcome ! Thanks.

    Comparison Class .h

    ...
  14. Replies
    10
    Views
    2,487

    Your first suggestion is great, but it would...

    Your first suggestion is great, but it would confuse other things, such as creating empty Paths which aren't linked to specific Graph objects yet. Some Path objects are temporary variables, which...
  15. Replies
    10
    Views
    2,487

    Thanks for the help, laserlight. That makes...

    Thanks for the help, laserlight. That makes sense, though it's gotten a little more complicated now. The function .getLength(Graph &) actually takes an argument, which is itself another class ( you...
  16. Replies
    10
    Views
    2,487

    Priority Queues

    Hello,

    I'm trying to implement a std::priority_queue, but the literature is quite fuzzy, and I don't understand some of the things I need to do.

    I have a class called Paths, which contains, as...
  17. tabstop - type is initialised in the constructor...

    tabstop - type is initialised in the constructor of the node, so I know exactly what's in there. In a Mortal, it's 2. In a Node, it's 0.

    And yes, I place my pieces at 1,1, again in the...
  18. Ah, I see where I went wrong there. I've now...

    Ah, I see where I went wrong there. I've now fixed that, but still get a segfault in the same place.
  19. How so ? They're part of Node, and so, part of...

    How so ? They're part of Node, and so, part of Mortal.
  20. int type, that is taken as an argument under...

    int type, that is taken as an argument under positions.presence, is part of an ENUM, and hence starts at zero, so there's no problem with it being invalid in the array.
  21. Interesting. error: cannot dynamic_cast...

    Interesting.


    error: cannot dynamic_cast `mortalslist.List::conductor' (of type `class Node*') to type `class Mortal*' (source type is not polymorphic)[/error]

    Using a reinterpret_cast, I was...
  22. Could you show me the syntax ? I've tried...

    Could you show me the syntax ? I've tried dynamic_cast on the line above, and couldn't get it to work. Namely,


    if(mortalslist.dynamic_cast<Mortal*>(conductor)->death) mortalslist.remove();
    ...
  23. Base-class pointer, accessing object from derived class

    Hello,

    I'd like to thank everyone that helped me out last time when I was having class issues - I've taken your recommendations on board and rewritten my code. Here's an explanation of my problem...
  24. Replies
    31
    Views
    2,696

    Mats, thanks again. Though, I'm still struggling...

    Mats, thanks again. Though, I'm still struggling to imagine placing the list management code INSIDE the objects themselves. I can put in my next and prev pointers, but the code from going from one...
  25. Replies
    31
    Views
    2,696

    Just to return to this lists class : All of my...

    Just to return to this lists class :

    All of my problems are arising from me accessing the previous or next pointer on a node that doesn't have a previous or next node. So, technically, all I need...
Results 1 to 25 of 211
Page 1 of 9 1 2 3 4