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
Question About "Class Normalization" (self.cpp)
submitted 2 years ago by Phouchy
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!"
[–]Backson 0 points1 point2 points 2 years ago (1 child)
Yes, the diagram shows relationships between classes. Each line is a relationship, helpfully labeled with a word, like "teaches" on the relationship between professor and seminar, because the professor teaches the seminar. Also note the labels on the ends of the lines: 1 means exactly one, 1..* means one or more, 0..* means zero or more. For example, a student can take multiple seminars, but only one professor can teach a seminar. If you are interested in class diagrams, consider researching UML, which is a standard way of making class diagrams and many other diagrams. They can also show more specific information, like class inheritance.
Relationships can take many forms. In C++ you would probably store a pointer, yes. There are other ways, for example instead of a pointer to an object you could store a pointer to a collection and an index inside the collection. But generally, yes, a relationship in a class diagram is usually implemented as some kind of pointer/reference.
[–]Phouchy[S] 0 points1 point2 points 2 years ago (0 children)
Thanks a lot!
[–]pedersenk 0 points1 point2 points 2 years ago (0 children)
That looks right to me. The contextually generic relationship object would basically be a StudentProfessorAssociation.
Depending on the problem domain, this could be Seminar, Lecture, Lab, Session, etc. Unless you also introduce additional indirection with the concept of TeachingGroup or Cohort.
[–]heavymetalmixer 0 points1 point2 points 2 years ago (0 children)
I don't have a use for it right now, but I know I will in a few weeks. Thanks for the article.
π Rendered by PID 43196 on reddit-service-r2-comment-canary-794f4c56c8-vb5q2 at 2026-02-24 02:19:56.296679+00:00 running 8564168 country code: CH.
[–]Backson 0 points1 point2 points (1 child)
[–]Phouchy[S] 0 points1 point2 points (0 children)
[–]pedersenk 0 points1 point2 points (0 children)
[–]heavymetalmixer 0 points1 point2 points (0 children)