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()...
Type: Posts; User: kmdv
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()...
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...
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,...
Right, I misread it.
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...
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...
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...
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...
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...
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'...
You have to show the actual code.
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...
There are tons of material on this subject. Noone is going to do the homework for you, especially if you cross-post.
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.
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...
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...
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...
Please post exemplary input file which crashes - it will be easier to debug it.
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()....
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...
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...
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...
"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,...
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...
It does not change anything - it is still not portable.