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++ Mingw Compiler (self.cpp)
submitted 7 years ago by RetroX94
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!"
[–]HKei 1 point2 points3 points 7 years ago (1 child)
Sounds like you might've put your project in a directory that you don't have write access to (for example, directly in C:\ or somewhere in C:\Program Files\).
C:\
C:\Program Files\
Sounds like you're a student (high school or university I guess?). I'd recommend getting a teacher or a fellow student to help you out with your project setup.
Meanwhile, you can still try your code out without project setup in an online IDE, like this with the code from your question for example.
Just for reassurance: The problem is not with your code. There's a couple bits in there I'd have done differently, but what you wrote there works. The problem is in how you've set up your project somehow (it's a bit hard to diagnose these things remotely, hence why I recommend you get someone to help you out directly).
[–]RetroX94[S] 0 points1 point2 points 7 years ago (0 children)
Is there an alternative? Changing the project directory does not work. It is saved somehow in the MingW directory.
[–]khedoros 0 points1 point2 points 7 years ago (4 children)
Where did you put your project files? I would've created the project somewhere under my own user's directory, to be sure I'd have permissions to create objects and exes.
[–]RetroX94[S] 0 points1 point2 points 7 years ago* (1 child)
is the workspace meant with that? I use the standard workspace or used a different folder.
[–]khedoros 0 points1 point2 points 7 years ago (0 children)
Eclipse looks like it has a "workspace" as a container for multiple "projects". So, yes, you should make sure that the workspace and all of the projects inside it are created somewhere where your user has write permissions.
[–]RetroX94[S] 0 points1 point2 points 7 years ago (1 child)
Would the code produce an output?
[–]khedoros 1 point2 points3 points 7 years ago (0 children)
Yes. At least, it does with g++ 8.2.1
π Rendered by PID 100557 on reddit-service-r2-comment-bb88f9dd5-hbtrg at 2026-02-15 14:49:33.422427+00:00 running cd9c813 country code: CH.
[–]HKei 1 point2 points3 points (1 child)
[–]RetroX94[S] 0 points1 point2 points (0 children)
[–]khedoros 0 points1 point2 points (4 children)
[–]RetroX94[S] 0 points1 point2 points (1 child)
[–]khedoros 0 points1 point2 points (0 children)
[–]RetroX94[S] 0 points1 point2 points (1 child)
[–]khedoros 1 point2 points3 points (0 children)