Fun Stuff > CHATTER
Learning has occurred
Gyrre:
--- Quote from: Tova on 02 Oct 2022, 15:57 ---I haven't touched C++ in a few years now and I wonder if I would even recognise it.
--- End quote ---
Since senior year of high school here (2004).
Is it cold in here?:
This reads in as many floating point numbers as there are in the input, allocates space for them and stores them. It's the equivalent of an old school sscanf loop:
std::vector<double> foo((std::istream_iterator<double>(iss)), std::istream_iterator<double>());
Akima:
--- Quote from: Is it cold in here? on 02 Oct 2022, 14:46 ---I'm finding out what modern C++ is capable of and just how much you can accomplish in a single line.
--- End quote ---
Wait 'til you discover grep...
hedgie:
Or awk.
cesium133:
--- Quote from: Is it cold in here? on 02 Oct 2022, 14:46 ---I'm finding out what modern C++ is capable of and just how much you can accomplish in a single line.
--- End quote ---
I like to go for the opposite of conciseness: https://github.com/db314159/Spl/blob/master/examples/rydberg.spl
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version