Search:

Type: Posts; User: Shaun32887

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Yeah... that's gonna work. Not sure why I didn't...

    Yeah... that's gonna work. Not sure why I didn't think of it myself, but that definitely works.

    Thanks!
  2. I know that, that's why I came here to ask the...

    I know that, that's why I came here to ask the question.

    I should also add that the point of the program wasn't to display those statements. Like I said, it was only a toy program, the concept...
  3. Yeah, you're right. I was thinking of another...

    Yeah, you're right. I was thinking of another less efficient way to write the if statements.



    Still, I would have the same problem.




    #include <iostream>
  4. Well, while it would have to fall through exactly...

    Well, while it would have to fall through exactly 1 case, I'd have to set up some kind of flag and then if then break thing. That actually could work, I'll look into this.





    Sorry, I didn't...
  5. I didn't mean I was trying to get around the way...

    I didn't mean I was trying to get around the way the language was defined. I was simply asking the more experienced programmers if there was a quick way that would produce the same results. The...
  6. Duplicate post, see bottom reply.

    Duplicate post, see bottom reply.
  7. There's no way around that? I chose switches...

    There's no way around that?

    I chose switches because for what I'm doing, the if statements will be MUCH slower... and there's a lot of data.
  8. Quick question concerning switch statements

    This code won't work, I'm assuming it's because the case can't be a logical statement.

    The actual program I'm working on would use a much more complex switch than this, this is simply a small...
  9. Replies
    12
    Views
    1,674

    I think what you want is if((r == "rock") ||...

    I think what you want is

    if((r == "rock") || (r == "1"))


    Something along those lines. The || is the OR operator.


    And yeah, loops and switches can be a little complicated at first if...
  10. Replies
    4
    Views
    1,639

    I think I'm not building the list correctly,...

    I think I'm not building the list correctly, which is frustrating since I'm using the same functions I use elsewhere, and they work there.
  11. Replies
    4
    Views
    1,639

    I think this was what was causing the program to...

    I think this was what was causing the program to crash, those should have been initialized to NULL. My mistake.


    I fixed it, and while the program doesn't crash anymore, it's not outputting to...
  12. Replies
    4
    Views
    1,639

    Function call is crashing program

    So, I have two classes defined, gramNode and molecule.

    I have linked lists created, the nodes of which are of the class gramNode. The class molecule has some data, and it includes a pointer to a...
  13. Thread: I...

    by Shaun32887
    Replies
    46
    Views
    13,226

    Yeah, some hospitals can be pretty bad. I work...

    Yeah, some hospitals can be pretty bad.

    I work at Methodist down here in Houston, and I'm very happy to say that none of that happens here. It's to the point that even if someone is dying and...
  14. Replies
    18
    Views
    4,024

    I'll do that, but how do they compare with...

    I'll do that, but how do they compare with similar utilities provided by Boost? I have boost already, would this be a better way to go?
  15. Replies
    6
    Views
    1,285

    So what's the standard way of handling this...

    So what's the standard way of handling this situation?

    I ask because the situation comes up a lot in my field and I've always been meaning to figure this out. When we're running samples on the...
  16. Replies
    11
    Views
    1,887

    :) Yeah, that sounds like it might be a problem....

    :) Yeah, that sounds like it might be a problem.

    Thanks laserlight, I'll go fix that.



    Fix:

    #include <string>
    #include <iostream>
  17. Replies
    18
    Views
    4,024

    You're always helpful Daved, thanks. I'll read...

    You're always helpful Daved, thanks.

    I'll read up on those topics and let everyone know what I eventually come up with.

    On a side note, I forgot to post the follow-up to my last thread. I just...
  18. Replies
    11
    Views
    1,887

    Almost forgot to do the follow up. Thanks to...

    Almost forgot to do the follow up.

    Thanks to everyone who helped me with this, here's the code I eventually settled with.




    #include <string>
    #include <iostream>
    using namespace std;
  19. Replies
    18
    Views
    4,024

    Thanks, I'll read through these. I looked at...

    Thanks, I'll read through these.

    I looked at them before, but I don't think I knew what a vector was last week, and I'm still not too sure about containers, so it was understandably over my head....
  20. Replies
    18
    Views
    4,024

    Thanks for the quick reply. I'll read through...

    Thanks for the quick reply.

    I'll read through that thread. This is promising though, vectors definitely feel more comfortable, especially due to the large uncertainty in the final number of...
  21. Replies
    18
    Views
    4,024

    Then let it be known that I trust everyone,...

    Then let it be known that I trust everyone, that's why I'm asking. However, I don't think anyone here will argue that there are many ways to approach any given problem. The methods given in one...
  22. Replies
    18
    Views
    4,024

    Daved, Thats for the tips, that's basically...

    Daved,

    Thats for the tips, that's basically exactly what I was looking for.

    I remember, when I read about vectors I got somewhat excited because the resemble the arrays of Matlab a little bit...
  23. Replies
    18
    Views
    4,024

    Seriously? There's smart people here, there's...

    Seriously?

    There's smart people here, there's smart people there. That board has helped me just as much as this one, why is it so insulting???


    Also, I don't think that TWO boards really...
  24. Replies
    18
    Views
    4,024

    Help with Data structures: Hash tables

    My boss has recommended a hash table, but I'd like some second opinions as to what you think the best way to accomplish this task is.

    My problem is that I don't know C++, so I've been learning...
  25. Replies
    3
    Views
    4,375

    I'm learning C++ right now for a job. I think...

    I'm learning C++ right now for a job. I think I'm progressing pretty quickly, I have about a month of experience right now.

    My method involves getting a textbook and reading chapters start to...
Results 1 to 25 of 43
Page 1 of 2 1 2