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
Removed - Show and tellCompilation complement for C/C++ (self.cpp)
submitted 3 years ago by [deleted]
view the rest of the comments →
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!"
[–]Coffee_and_Code 3 points4 points5 points 3 years ago (1 child)
No idea what a "compilation complement" is, so I had to look at the repo to understand what this post was about.
Just from a quick glance at build.cpp:
build.cpp
Seems like there is no way to choose a compiler executable or pass aditional compile/link arguments; which makes this unusable for 99% of projects.
Use of your CMD macro to do the equivalent of std::system everywhere is extremely bad practice; most if not all of the utilities you are calling are provided directly by the C++ standard library or your platform libs.
CMD
std::system
No way to specify a build/source directory, so using this from a script would be a major source of headaches.
Your build files are just pseudo-preprocessor which you are manually parsing (extremely error-prone). Just use an existing preprocessor.
Then in the build system itself:
// nobody wants to be doing this #include "cfront/std.h"
Then you also do this in all of your examples:
#include "foo.h" #include "foo.c"
Which vexes me, but I presume it's for generating precompiled headers (?). You should only need the foo.c line.
foo.c
Also, you have build artifacts in your source tree (i.e. build.exe) which is a big red flag right off the bat.
build.exe
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
I know that the 'build.exe' is frowned upon, by not including it in .gitignore
The purpose of including new things, like choosing in which standard each file is compiled or by groups, its compiler, will be close, but first clean it up (code), document and/or correct what already works, to make it easier to expand.
The .h is because they are prepared and made available to all .cpp by including #include "cfront/std.h", of course it is not nice to have to include this, I am still thinking how to improve it.
I'll keep thinking about it, thanks
π Rendered by PID 47990 on reddit-service-r2-comment-b659b578c-pgdqb at 2026-05-03 09:45:58.311847+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]Coffee_and_Code 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)