3 ms·
It's funny. I know very little about C++ and my first thought was that this was, essentially, a shortcut for something like: path += '/' + 'yourfile.txt';
by maemilius 11y ago
It's funny. I know very little about C++ and my first thought was that this was, essentially, a shortcut for something like:
path += '/' + 'yourfile.txt';
It's also entirely possible that I'd already subconsciously read ahead and so knew that it couldn't have possibly been division.
- coldpie 11y agoIt's easy in a little two-line snippet discovered in the context of a discussion about operator overloading. It's much less easy to understand when grepping for a config file name (which is where I found it) where you don't even have the declaration of the variable to give you the context that you're dealing with anything other than char*.