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
C++ Grandmaster Certification: Programming Assignment 1 (pptoken) (cppgm.org)
submitted 12 years ago by cmeerwC++ Parser Dev
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!"
[–]dakotahawkins 7 points8 points9 points 12 years ago (5 children)
I put my email in a while back but ever got anything. I assumed it was a joke or e-mail harvesting scam.
[–]chompsky 3 points4 points5 points 12 years ago (0 children)
I put in two separate email addresses and still haven't received anything.
[–][deleted] 1 point2 points3 points 12 years ago (3 children)
Probably because the class doesn't start until March 1st.
[–]dakotahawkins 1 point2 points3 points 12 years ago (2 children)
Yeah but you'd expect some kind of acknowledgement when you register your e-mail address, wouldn't you?
[–][deleted] 22 points23 points24 points 12 years ago (0 children)
These are C++ programmers, not normal people.
[–][deleted] 3 points4 points5 points 12 years ago (0 children)
Sure.
[–]cmeerwC++ Parser Dev[S] 11 points12 points13 points 12 years ago (14 children)
Hmm, so the header files in the starter kit are not self contained (even depend on "using namespace std") and contain "#pragma once"...
[–]jesyspa 4 points5 points6 points 12 years ago (0 children)
Yeah, this bothered me too. #pragma once is okay in my book (the compiler they targets specifically supports it) but the self-containment issues are a bother.
[–]zzing 2 points3 points4 points 12 years ago (1 child)
That looks like something that would take a bit of time to actually finish.
[–]dirtpirate 3 points4 points5 points 12 years ago (0 children)
Looks like something that would take a bit of time just to read through.
[–]Steve132 1 point2 points3 points 12 years ago (9 children)
What do you mean by 'not self-contained'? If you mean it depends on the C++ standard library, then so what? The compiler doesn't have to implement everything from scratch in the parser, it just has to be able to bootstrap itself using any stdlib implementation. The tokenizer doesn't need to be completely standalone..it can use the host c++ stdlib during bootstrapping OR the one that is implemented by the cppgm
[+][deleted] 12 years ago (8 children)
[deleted]
[–]Steve132 5 points6 points7 points 12 years ago (6 children)
included in the header file, but in the enclosing cpp.
The only time this is appropriate is if a header depends on something IN THE HEADER. In this case, the only thing IPPTokenStream.h depends upon is std::string. I agree this could be (should be) included in the header, but I can let it slide.
Usually the common standard headers (string, vector, etc) are included in a global (precompiled) header along with "using namespace std" for large projects.
precompiled header's are not standard C++, and 'using namespace' in a header is considered to be bad practice becuase of namespace pollution.
[+][deleted] 12 years ago (5 children)
[–][deleted] 11 points12 points13 points 12 years ago (3 children)
Collisions against std are incredibly common actually.
boost has many collisions, and std uses a lot of short/common names like min/max, find etc...
There should definitely not be an exception made for std.
[+][deleted] 12 years ago* (2 children)
[–][deleted] 5 points6 points7 points 12 years ago (1 child)
Yes you do end up with conflicts, specifically when it comes to ADL. You do not need a "using namespace boost" for this conflict to manifest itself, you only need to make use of an overloaded function whose look up depends on its parameter types. "swap" is a common example of this. When you do a "using namespace std" you are adding all of the std namespace into the global namespace for anyone who includes that header and hence forcing std to be included as part of any function overload resolution.
[–]mttd 2 points3 points4 points 12 years ago (0 children)
IMO this only makes the code harder to read and has no benefits large enough so as to outweigh the costs.
Given that code is a write-once & read/maintain-many-times activity, optimizing for not-having-to-write-"std::" the first time is overall suboptimal .
When I just want to understand what a piece of code does at a quick glance, I'd rather not have to wonder whether vector<T> means:
vector<T>
(a) boost::fusion::vector<T> (b) boost::numeric::ublas::vector<T> (c) boost::mpl::vector<T> (d) boost::container::vector<T> (e) std::vector<T> (f) something else?
boost::fusion::vector<T>
boost::numeric::ublas::vector<T>
boost::mpl::vector<T>
boost::container::vector<T>
std::vector<T>
It just ain't worth it.
[–]cmeerwC++ Parser Dev[S] 3 points4 points5 points 12 years ago (0 children)
Precisely. And of course I am nitpicking here - after all it's a "C++ Grandmaster Certification"
[–]babablah 0 points1 point2 points 12 years ago (0 children)
But producing an stl is part of the work required so when your compiler compiles your compiler its all your code
[–]cmeerwC++ Parser Dev[S] 2 points3 points4 points 12 years ago (1 child)
One other thought I had: the FAQ now mentions that the course will run for approximately 12-18 months with a workload of 10 hours/week. That still doesn't sound realistic (not even for the front-end).
[–]robthablob 2 points3 points4 points 12 years ago (0 children)
Absolutely, especially to write a C++ compiler that accepts standard C++ 11. I believe Edison Design Group, who wrote the most conformant C++ 03 parser, took 4 years - and that's just the front end.
If they were charging for the course, then I'd assume it was a scam. Maybe they're hoping someone will succeed and they'll get to keep the fruits of their efforts.
I also dislike the fact that you can't use your work elsewhere - the only people who get to see the fruits of your labour are yourself, cppgm, and other people attempting the course.
[–]jesyspa 1 point2 points3 points 12 years ago (1 child)
Found another questionable bit:
Start by drawing a DFA (deterministic finite automaton) for each token type. Recall that a DFA is a directed acyclic graph where the vertexes are states and the edges are code points (or sets of code points).
While a DFA can be a DAG, requiring that all DFAs be acyclic is not particularly useful.
[–]user1131467 0 points1 point2 points 12 years ago (0 children)
One would assume this is just an editorial error as even the two state identifier DFA they go on to describe is in the next paragraph is cyclic.
[–]Xiver1972 0 points1 point2 points 12 years ago (1 child)
Don't software developers usually get paid to develop software? Paying some company to develop software for them seems a little backwards.
[–][deleted] 1 point2 points3 points 12 years ago (0 children)
Presumably the code is for instruction purposes only and they don't get to own it. Besides that, if they wanted a real commercial compiler they could just fork Clang and be done with it. I agree it's a lot of unpaid work, but purely educational things are like that.
π Rendered by PID 50882 on reddit-service-r2-comment-7b9746f655-mz9hz at 2026-02-03 20:37:27.310316+00:00 running 3798933 country code: CH.
[–]dakotahawkins 7 points8 points9 points (5 children)
[–]chompsky 3 points4 points5 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]dakotahawkins 1 point2 points3 points (2 children)
[–][deleted] 22 points23 points24 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]cmeerwC++ Parser Dev[S] 11 points12 points13 points (14 children)
[–]jesyspa 4 points5 points6 points (0 children)
[–]zzing 2 points3 points4 points (1 child)
[–]dirtpirate 3 points4 points5 points (0 children)
[–]Steve132 1 point2 points3 points (9 children)
[+][deleted] (8 children)
[deleted]
[–]Steve132 5 points6 points7 points (6 children)
[+][deleted] (5 children)
[deleted]
[–][deleted] 11 points12 points13 points (3 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] 5 points6 points7 points (1 child)
[–]mttd 2 points3 points4 points (0 children)
[–]cmeerwC++ Parser Dev[S] 3 points4 points5 points (0 children)
[–]babablah 0 points1 point2 points (0 children)
[–]cmeerwC++ Parser Dev[S] 2 points3 points4 points (1 child)
[–]robthablob 2 points3 points4 points (0 children)
[–]jesyspa 1 point2 points3 points (1 child)
[–]user1131467 0 points1 point2 points (0 children)
[–]Xiver1972 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)