All Questions
7
questions
5
votes
4
answers
2k
views
StringPool in C++
I wrote a simple string pool for my compiler in C++ and want to hear your thoughts on its design.
String pool has 2 functions: intern and ...
7
votes
2
answers
1k
views
Implementing a copy on write String class using reference counting in C++
I have tried to implement a copy on write string class with value semantics and reference counting.
I wanted to support indexing, so I have overloaded the operator[] and to differentiate between the ...
2
votes
1
answer
555
views
Memory management for fetching a list of drive letters on Windows
I'm using the WinAPI GetLogicalDriveStrings() function that requires a LPWSTR and am wondering if there is a safer way to do ...
9
votes
2
answers
1k
views
C++ String class
I made a string class to be used as a replacement for std::string. It has all the find functions (find, ...
4
votes
2
answers
4k
views
Rule of five and move semantics for a string class
I have been learning about the rule of five and I tried to implement an example myself. It all works exactly as I'd expect, but I was wondering if I've missed any obvious issues or easier/faster ways ...
5
votes
1
answer
616
views
Lazy String splitter in C++
I created a string splitter in C++. It splits a string in a lazy fashion and makes use of forward iterators to sequentially supply the next token from the string until it runs out of tokens.
...
3
votes
1
answer
5k
views
Dynamically allocated C strings in C++, concatenation, pointers, etc
I'm writing a small Win32 console app that manipulates the contents of binary files. It accepts the filename as a command line parameter and writes to a file named filename.scramble
This is the first ...