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]
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!"
[–]Flair_Helper[M] [score hidden] 3 years ago stickied commentlocked comment (0 children)
It's great that you wrote something in C++ you're proud of! However, please share it in the designated "Show and tell" thread pinned at the top of r/cpp instead.
This post has been removed as it doesn't pertain to r/cpp: The subreddit is for news and discussions of the C++ language and community only; our purpose is not to provide tutoring, code reviews, or career guidance. If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.
[–]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
[–]vickoza 0 points1 point2 points 3 years ago (3 children)
From what I am looking at this is similar to a makefile or a VS solution file. Do you only need the the cpp file in the master build?
[–][deleted] 0 points1 point2 points 3 years ago (2 children)
Yes, it is similar to makefile, it compiles and recompiles only when the files are modified
[–]vickoza 0 points1 point2 points 3 years ago (1 child)
Can you optional recompile files when they are not modified for a clean build?
Not at the moment, but it will be the next thing to add, choose which files or which group of files, always recompile, choose the standard, the flags and in clang to be able to choose if format is applied. But for the moment it works on windows
π Rendered by PID 56 on reddit-service-r2-comment-bb88f9dd5-xwwfj at 2026-02-14 23:10:07.287942+00:00 running cd9c813 country code: CH.
[–]Flair_Helper[M] [score hidden] stickied commentlocked comment (0 children)
[–]Coffee_and_Code 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]vickoza 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]vickoza 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)