Search:

Type: Posts; User: msh

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,882

    Well done. :) Using a private member function...

    Well done. :)

    Using a private member function generally isn't allowed. `GetNext()` and `SetNext()` are in the public section of the Player class, so it's perfectly fine.

    Your expectations of...
  2. Replies
    26
    Views
    4,829

    I agree. The relationship between developers and...

    I agree. The relationship between developers and their tools: languages, compilers, frameworks, OS and so on, should be one-to-many. Having favorites is good and even desirable; going all exclusive...
  3. Replies
    5
    Views
    817

    TBH, C++ Standard is a goodnight read compared to...

    TBH, C++ Standard is a goodnight read compared to that.
  4. Replies
    26
    Views
    4,829

    You don't have to abandon one language to learn...

    You don't have to abandon one language to learn another, and neither do you need PhD in <language-x> to do something useful with it.
  5. Replies
    9
    Views
    2,782

    Madness! (That'd work, too.)

    Madness! (That'd work, too.)
  6. Replies
    9
    Views
    2,782

    It'd be better to just install MinGW with MSYS,...

    It'd be better to just install MinGW with MSYS, which comes with a shell that gives you a sane if minimalistic *nix environment to work in.
  7. Replies
    4
    Views
    1,131

    Had some fun with iterators. :redface: I think...

    Had some fun with iterators. :redface: I think the sub-sum part came out very neat. Disregarding the ugly conditional inclusions...



    #include <iostream>
    #include <fstream>
    #include <vector>...
  8. Replies
    26
    Views
    4,829

    Stop being programmer! ...

    Stop being <language-x> programmer! <language-x> is a tool, you can have many of them -- what a concept!

    If your passion is <language-x> and you're not a compiler developer, then you're doing it...
  9. You have to learn to crawl before you can use...

    You have to learn to crawl before you can use portals.
  10. Replies
    12
    Views
    2,505

    We don't, but we can with...

    We don't, but we can with `std::string::reserve()`.
  11. Why you're calling `getline()` on L36 if you...

    Why you're calling `getline()` on L36 if you already copied the header text into `header` on L28-L32?

    Anyhow. Your strange behaviour is caused by the fact that `>>` operator skips leading...
  12. Replies
    12
    Views
    2,505

    No. Second parameter is a buffer that receives...

    No. Second parameter is a buffer that receives data, but `c_str()` returns `const char*`.
  13. Replies
    5
    Views
    2,429

    Try implementing this and come back to us if you...

    Try implementing this and come back to us if you get stuck.

    UVa 108 - Algorithmist
  14. Replies
    10
    Views
    1,181

    You're right. Yes, it's not a pointer in a...

    You're right.

    Yes, it's not a pointer in a strictly C sense, but, and correct me if I'm wrong, that is what it will become during compilation -- an address in the data segment where the string...
  15. Replies
    18
    Views
    2,024

    It might involve writting some code... I dunno...

    It might involve writting some code... I dunno...
  16. Replies
    4
    Views
    5,489

    Sort the array in ascending order; then first N...

    Sort the array in ascending order; then first N elements of it will be the N smallest numbers in the array.
  17. Replies
    9
    Views
    5,429

    Repeat after me: "I'm not coding for CPU, I'm...

    Repeat after me: "I'm not coding for CPU, I'm coding for the OS".

    Sure, you could implement some sort of concurrency middleware between the OS and your application. Whether can implies should is...
  18. Replies
    9
    Views
    5,429

    Concurrency is as OS-specific as OS features...

    Concurrency is as OS-specific as OS features come. You should use a multi-threading library that is cross-platform instead. Google for it.
  19. Replies
    10
    Views
    1,181

    kcuF this code; you don't want to program like...

    kcuF this code; you don't want to program like this.

    It works because pointers are integral types and addition is commutative for them, and, for example, `3["this"]` is the same `("this") + 3`.
  20. Thread: Confused Big time

    by msh
    Replies
    8
    Views
    1,021

    Pretty sure I could end world hunger with that...

    Pretty sure I could end world hunger with that sort of money...
  21. Replies
    5
    Views
    1,022

    Why would you think it necessary to have a null...

    Why would you think it necessary to have a null terminator in this case?
  22. Replies
    4
    Views
    741

    Which one do you want? int (*p)[2]; //...

    Which one do you want?


    int (*p)[2]; // pointer `p` to array of 2 int's
    int *p[2]; // array `p` of 2 pointers to int
  23. Thread: Creating new files

    by msh
    Replies
    6
    Views
    655

    Just call `fclose(fopen(filename, "w"));`.

    Just call `fclose(fopen(filename, "w"));`.
  24. No. I mean your #include directives.

    No. I mean your #include directives.
  25. Show us a list of your includes.

    Show us a list of your includes.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4