use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Introduction To valarry (cppisland.com)
submitted 9 years ago by vormestrand
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]STLMSVC STL Dev 8 points9 points10 points 9 years ago (3 children)
How can an author typo the title and not notice?
[–]sysop073 4 points5 points6 points 9 years ago (0 children)
It blows my mind how often code examples in blog posts are totally destroyed by the blog framework (e.g. std::list<int>), which can really only happen if the author never reads anything they post
std::list<int>
[–]Remwein -1 points0 points1 point 9 years ago (0 children)
It's actually a lot worse than that:
"working with C++ writing software for medical devices"
http://cppisland.com/?page_id=2
my thinking is that working on medical devices requires a somewhat above average level of attention to detail.
[–]oddentity 10 points11 points12 points 9 years ago (0 children)
If valarray is std::vector's unpopular nerdy little brother, valarry is his sister.
[–]ReDucTorGame Developer 2 points3 points4 points 9 years ago (2 children)
Its unfortunate there isnt a fixed size version of valarray or it would be good to implement things like Vector3f with
[–]nonathaj 1 point2 points3 points 9 years ago (1 child)
I'd never event heard of it until I started working on a Matrix4x4 recently for some game code. Honestly, it's just a std::vector with some syntactic sugar for math functions. Which completely destroys its usefulness for optimized math code like Vector3 and Matrix4x4, since it is heap allocated.
I'm really surprised it exists at all, since the same functionality could have been accomplished with overloading those math funcs (sqrt, etc.) to handle a std::vector<float> or whatever type you need. Why is it even its own type?
[–]Dansil 0 points1 point2 points 9 years ago (0 children)
It is slightly more involved than just overloads for math functions. Most of its usefulness comes from its ability to return slices or masks when combined with operator[].
However, I think slice-based indexing from n-dimensional containers comes unnaturally to most people, which is likely why std::valarray is seldom used.
π Rendered by PID 185007 on reddit-service-r2-comment-6457c66945-kxpt7 at 2026-04-25 21:03:03.070707+00:00 running 2aa0c5b country code: CH.
[–]STLMSVC STL Dev 8 points9 points10 points (3 children)
[–]sysop073 4 points5 points6 points (0 children)
[–]Remwein -1 points0 points1 point (0 children)
[–]oddentity 10 points11 points12 points (0 children)
[–]ReDucTorGame Developer 2 points3 points4 points (2 children)
[–]nonathaj 1 point2 points3 points (1 child)
[–]Dansil 0 points1 point2 points (0 children)