Search:

Type: Posts; User: kmdv

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    22
    Views
    15,689

    I'm not sure if we understand each other. I meant...

    I'm not sure if we understand each other. I meant that there is no standard way to open a stream given a Unicode path. MSVC comes to the rescue and provides additional overrides of the open()...
  2. Replies
    22
    Views
    15,689

    I would be very cautious saying it just "works"....

    I would be very cautious saying it just "works". As long as you deal with in-memory strings only it might be fine. However, if you try to use Unicode with any other standard C++ stuff, you are out of...
  3. Replies
    22
    Views
    15,689

    Firstly, "the largest character set supported" as...

    Firstly, "the largest character set supported" as you name it (this is not valid though, as all UTF encodings support all Unicode characters) is UTF-32 which is 4 bytes per each character (code unit,...
  4. Replies
    22
    Views
    15,689

    Right, I misread it.

    Right, I misread it.
  5. Replies
    22
    Views
    15,689

    In standard C++ Unicode support is almost...

    In standard C++ Unicode support is almost non-existent compared to other languages. If you need Unicode and don't want to reinvent the wheel, you should find some 3rd party library.

    Different...
  6. Replies
    7
    Views
    818

    The linked advice incorrectly assumes that coding...

    The linked advice incorrectly assumes that coding errors == memory corruptions. In C++ coding errors are very often memory corruptions, but there are also other cases.

    Whether it is a good advice...
  7. Replies
    15
    Views
    3,301

    This solution is misleading, because one could...

    This solution is misleading, because one could deduce from it that changing 0 to 1
    doublequantity[itemNumber] = { 1 }; would initialize all elements to 1, which is wrong, because it would only...
  8. Replies
    15
    Views
    3,301

    std::vector is not a mathematical vector. It...

    std::vector is not a mathematical vector. It serves a purpose of a container storing its elements sequentially in a contiguous chunk of memory (it is a dynamically grown array).
    There are some...
  9. Replies
    10
    Views
    2,693

    This won't work. You cannot stop recursive...

    This won't work. You cannot stop recursive template instantiations by a simple return statement. Return statements work at runtime, not at compile time. Recursive template instantiation must be...
  10. Thread: About std::flush

    by kmdv
    Replies
    4
    Views
    782

    It should be also pointed out that std::endl,...

    It should be also pointed out that std::endl, which outputs newline character, also flushes the stream. (To avoid flushing when inserting a newline character, one has to explicitly insert '\n'...
  11. You have to show the actual code.

    You have to show the actual code.
  12. Have a nice read:...

    Have a nice read:
    https://www.youtube.com/watch?v=xO3ED27rMHs
    https://www.youtube.com/watch?v=fmyE7DiaIYQ
    Morphological Dilation and Erosion - MATLAB & Simulink
    Eroding and Dilating — OpenCV...
  13. There are tons of material on this subject. Noone...

    There are tons of material on this subject. Noone is going to do the homework for you, especially if you cross-post.
  14. Thread: Scope resolution

    by kmdv
    Replies
    2
    Views
    490

    No, it is not (not directly). showpos is a member...

    No, it is not (not directly). showpos is a member of the ios_base class. Without using namespace std, you would have to write:
    - std::cout instead of cout,
    - std::ios_base instead of ios_base,
    etc.
  15. It does need parentheses if it is typename...

    It does need parentheses if it is typename instead of expression. But here it is expression, so right, it is fine.

    Anyway, it does not crash for me and I could not find any error by looking at the...
  16. As long as you don't have to worry about the...

    As long as you don't have to worry about the underlying memory layout (e.g.: you don't implement your own networking protocol), or any memory footprint, there is no need to worry about bits. Just use...
  17. Unfortunately, I was unable to reproduce the...

    Unfortunately, I was unable to reproduce the problem. Line 37 has sizeof without parentheses, so it does not compile as it is. However, I fixed it (added parentheses) and the program runs fine...
  18. Please post exemplary input file which crashes -...

    Please post exemplary input file which crashes - it will be easier to debug it.
  19. Replies
    3
    Views
    457

    If you use VC++, you can just use wmain() and be...

    If you use VC++, you can just use wmain() and be fine with properly tokenized command line. If you really need to use GetCommandLineW(), then you can pass the result to CommandLineToArgvW()....
  20. If you only need to search for words, then...

    If you only need to search for words, then probably storing all content into a single char array will suffice. You can google how to achieve it. Then, if you have any problems, you can post here your...
  21. Replies
    11
    Views
    1,886

    You'd better use smart pointers, unless you...

    You'd better use smart pointers, unless you really need covariance in your copytype() function.

    I don't know what you exactly want to do, but if I were you, I would think twice before using...
  22. It depends what you mean by incorporating. I'm...

    It depends what you mean by incorporating. I'm only guessing that you mean something like std::set<std::shared_ptr<std::string>> which holds preallocated container values.

    I can point out that the...
  23. Replies
    2
    Views
    2,019

    "cin.get()" isn't common at all. At least not in...

    "cin.get()" isn't common at all. At least not in anything more serious than a homework.

    C++ has only notion of streams - if standard C++ is concerned, there is no concept of a console. By default,...
  24. Considering you can write it at home... what's...

    Considering you can write it at home... what's the problem? If you know Java, it shouldn't be any problem for you to write it in Java first, but without OOP (only static methods, static fields, and...
  25. Thread: Endian swap error

    by kmdv
    Replies
    11
    Views
    702

    It does not change anything - it is still not...

    It does not change anything - it is still not portable.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4