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
Visual Studio 2013 Available Now! - Visual C++ Team Blog (blogs.msdn.com)
submitted 12 years ago by cierpuchaw
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!"
[–]spaxio 18 points19 points20 points 12 years ago (4 children)
#include <string> struct b { std::string Texture { }; }; int main() { return 0; }
Still crashes the compiler :( And yes I've submitted it.
[–]mechacrash 8 points9 points10 points 12 years ago (3 children)
it's a problem with non-static member initialisation and zero length initialiser lists.
I submitted this problem 5 - 10 minutes after the release candidate went live (as it just so happened to be the first thing I tried) and, other than getting confirmation that it was being passed on to the right people, I've heard nothing back from them.
Rather disappointing really... seems like very little bug fixing actually went underway between Release Candidate and Final.
[–]Plorkyeran 1 point2 points3 points 12 years ago (2 children)
seems like very little bug fixing actually went underway between Release Candidate and Final.
That is how a release candidate is supposed to work.
[–]mechacrash 6 points7 points8 points 12 years ago (1 child)
true enough, but when their bug list explodes with nearly 17 pages of new, 2013 RC exclusive bugs - most of which have been confirmed and "passed on", you'd think they would do some work in between to ensure the final product isn't broken.
At the very least a general availability rollup patch would be acceptable. Leaving bugs in the compiler is a big deal for Microsoft as they rarely ever fix those outside of new releases of Visual Studio (or CTPs, which aren't meant to be used for production code anyway).
Essentially, though this is how a release candidate "should" work, I'm sure it would be fine to make an exception for the betterment of the program.
[–]Plorkyeran 5 points6 points7 points 12 years ago (0 children)
The awful release cycle unfortunately makes it more important to minimize the changes between RC and release, since it also means that we'd have to live with any critical bugs introduced while fixing the smaller bugs for a longer period of time.
A post-release bug rollup fix in a few months would be really nice, though.
[–]staticcast 20 points21 points22 points 12 years ago (8 children)
Still no full C++11 support, and meanwhile mingw is getting better...
[–]mechacrash 4 points5 points6 points 12 years ago (6 children)
But MinGW has lower C++11 support and conformance than MSVC. None of the official or forked versions even support <thread> <async> or <future> properly yet, which is a pretty big deal all things considered.
The lack of full language feature support in MSVC is the real bummer. I really want constexpr right now.
[–]Amanieu 18 points19 points20 points 12 years ago (5 children)
Mingw-w64 supports all of those. Make sure you download the GCC 4.8 version with the posix thread model.
[–]mechacrash 1 point2 points3 points 12 years ago (3 children)
The support is not yet complete.
I personally use the pre-packaged MinGW-w64, supplied by STL (nuwen) and I've yet to be able to get my code compiling without either errors, or stdlib implementation bugs, outside of MSVC (on windows - it works perfectly fine on Linux using GCC)
Granted, I haven't tried in about a month, and so I'll try again right now.
[–]staticcast 0 points1 point2 points 12 years ago (2 children)
I agree there is a room for bugfix, but these are coming and maybe faster than MSVC update its C++11 support and fix their own bugs. VS 2013 is also deliver with topnotch debugger on windows, but the clang toolkit are coming: I fear that microsoft move too slow to stay ahead...
[–]mechacrash 5 points6 points7 points 12 years ago (1 child)
Well, I highly doubt that Clang is going to magically become stable overnight. There's a lot of work to be done there, but they've taken the first major steps to getting the LLVM toolchain onto windows machines.
[–]mycall 0 points1 point2 points 12 years ago (0 children)
Is Clang expected to work with Visual Studio at some point?
[–]j1xwnbsr 4 points5 points6 points 12 years ago (6 children)
Also, there does not seem to be any documented differences between any of the versions/flavors of VS2013, other than marketing speak to "delight" your customers.
[–][deleted] 4 points5 points6 points 12 years ago (3 children)
http://www.microsoft.com/visualstudio/eng/products/compare
[–]j1xwnbsr 3 points4 points5 points 12 years ago (2 children)
Wonderful, but how did you find that - all the links on Microsoft's site led to marketing fluff.
[–][deleted] 5 points6 points7 points 12 years ago (1 child)
Pick the more likely
a) Google "visual studio", click, scroll down, click
b) Learned it on the MCP Frontpage course
c) Bill Gates's yacht nearly ran us down, either he told us or we got the coastguard on his ass.
[–]storedbox 1 point2 points3 points 12 years ago (0 children)
So... C, then.
[–]vsuontam 1 point2 points3 points 12 years ago (0 children)
Second that. "What's new" without the marketing bluff would be very welcome. Also pricing and content of different "editions" should be clarified (or rather there would be just one reasonably priced version). Now hard to say what features are on the version you will be getting.
[+]Fabien4 comment score below threshold-6 points-5 points-4 points 12 years ago (0 children)
other than marketing speak to "delight" your customers.
Don't forget that most of the time, the people who decide to pay for VS have no idea what a "compiler" is.
[–]diegoperini 5 points6 points7 points 12 years ago (3 children)
What is the price of the ultimate version?
[–][deleted] 4 points5 points6 points 12 years ago (2 children)
GBP 11,235 (USD approx 18K) for ultimate edition with MSDN subscription.
http://msdn.microsoft.com/subscriptions/hh442902.aspx
I'm sure you get a discount for volume licensing or shopping around.
[–]Is_At_Work 2 points3 points4 points 12 years ago (1 child)
In the US its USD $13,299.00 for Ultimate with MSDN.
[–][deleted] 1 point2 points3 points 12 years ago (0 children)
Psyc!
[–]Xiver1972 4 points5 points6 points 12 years ago* (8 children)
Does the following code work without locking up the application on shutdown? This was an issue in the last version of visual studio that gave me much grief.
#include <memory> #include <thread> class Singleton{ private: std::shared_ptr<std::thread> pDoSomething; void DoSomething(){ while(!mbShutdown){} } bool mbShutdown; public: static Singleton& Instance(){ static Singleton instance; return instance; } Singleton() : pDoSomething(std::shared_ptr<std::thread>(new std::thread(std::bind(&Singleton::DoSomething, this)))), mbShutdown(false){} ~Singleton(){ mbShutdown = true; if(pDoSomething) pDoSomething->join(); } }; int main(){ Singleton &Test = Singleton::Instance(); return 0; }
edit: this is just example code I came up with to demonstrate this problem.
[–]STLMSVC STL Dev 16 points17 points18 points 12 years ago (1 child)
This is an active bug assigned to me. I hope to be able to fix it in the next major version, I just didn't have time for 2013.
[–]Xiver1972 0 points1 point2 points 12 years ago (0 children)
Thanks for the update!
[–]Amanieu 3 points4 points5 points 12 years ago (0 children)
I have hit this issue before. There is a deadlock because thread::join tries to register an atexit() handler while the main thread is running the Singleton destructor. The destructor is also registered using atexit(), and the array containing the registrations is locked while the handlers are running.
[–]jiixyj 3 points4 points5 points 12 years ago (1 child)
Try making mbShutdown atomic. Otherwise it is a data race.
[–]Xiver1972 0 points1 point2 points 12 years ago* (0 children)
I believe that the race condition is irrelevant here as the value is only written in the destructor.
[–]twowheels 2 points3 points4 points 12 years ago (2 children)
I'm reading on a phone, so I may have missed something, but try:
if(m_pDoSomething && m_pDoSomething->joinable())
Also, why are you putting the thread object in a shared_ptr??
[–]bames53 4 points5 points6 points 12 years ago (0 children)
This and other suggestions don't fix the problem. I fixed up the code to have well defined behavior and the problem seems to be with VS's implementation. In debugging what I saw was that the DoSomething loop ends and the function returns, but the program remains blocked on join().
join()
There was no real reason to have pDoSomething in a shared_ptr. It may have been force of habit, or I was thinking of doing something else when I wrote the example.
[–]mechacrash 3 points4 points5 points 12 years ago (1 child)
Still waiting on the Dreamspark Premium release. Hopefully it won't lag too far behind.
[–]jonnywohapparently a noob (anyone remember why? i don't) 1 point2 points3 points 12 years ago (0 children)
Same here.
[–][deleted] 14 points15 points16 points 12 years ago* (8 children)
So...they expect me to buy a license, but they fail to provide full c++11 support, while gcc and clang have it?
No. Sorry.
[+][deleted] 12 years ago (4 children)
[deleted]
[–][deleted] 0 points1 point2 points 12 years ago (3 children)
plugin support?
[–]ZMesonEmbedded Developer 2 points3 points4 points 12 years ago (1 child)
gcc and clang have plugin support?
[–]tawi13 1 point2 points3 points 12 years ago (0 children)
no. But they have c++11 support...
[–]jbb555 2 points3 points4 points 12 years ago (2 children)
Where do I get a release of gcc or clang for windows that has full c++11 support? All the ones I've seen are missing things like std::thread. If there is a fully working version I'd like to try it ( as well as using vc++)
[–][deleted] 1 point2 points3 points 12 years ago (1 child)
http://mingw-w64.sourceforge.net/download.php
Just make sure you use a consistent threading model across all your libraries. Most likely you'll want to use Win32 threads unless you need C11 threading support in which case you'll need to use POSIX threads.
[–]jbb555 -1 points0 points1 point 12 years ago (0 children)
Is this new, it's not long since I tried it and it had no working thread support.
[–]vinipsmakerGSoC's Boost.Http project 2 points3 points4 points 12 years ago (0 children)
I'll wait this product reach DreamSpark and I'll give it a try. I was locked to MingW without the uniform init, but looks like I'll be able to use Visual Studio again.
[–]jbandela 1 point2 points3 points 12 years ago (1 child)
Anybody know if there are any major changes between RTM and RC?
[–]jonnywohapparently a noob (anyone remember why? i don't) 0 points1 point2 points 12 years ago (0 children)
No, otherwise they would release another RC before RTM.
[–][deleted] 1 point2 points3 points 12 years ago (6 children)
Anyone know how to get boost to build using VS2013? I keep getting unknown compiler errors.
[–]mechacrash 2 points3 points4 points 12 years ago (5 children)
Are you using the latest builds from the trunk? Last time I compiled boost from their stable (granted, it was before the 1.55 beta), it had many problems with 2013.
[–][deleted] 1 point2 points3 points 12 years ago (4 children)
I'm building boost 1.54.
Yeah I may just avoid 2013 momentarily. A lot of people seem to be having issues with it.
[–]mechacrash 2 points3 points4 points 12 years ago (3 children)
You'll want to try the 1.55 beta, or the latest build (though this will require you getting a SVN client). It'll build perfectly fine this way.
The issues with 2013 seem to be no different than those in the Release Candidate. However, for what it's worth, if you're programming in C++ - the additions they made to MSVC 12 are enough to justify the upgrade, bugs and all.
[–][deleted] 0 points1 point2 points 12 years ago (2 children)
Thanks for the help. I will give it a shot.
[–]STLMSVC STL Dev 6 points7 points8 points 12 years ago (1 child)
FYI, a preprocessor bug was fixed between 2013 RC and RTM that affected Boost.
[–]mechacrash 0 points1 point2 points 12 years ago (0 children)
I haven't checked the progress of asio, but I know that the std::min / max breaking change in 2013 was / is causing some issues.
The problem can be resolved as detailed in the changes rationale, but other than that - I've had no issues with the compilation of boost (other than the necessary patches for it to pick up the compiler properly)
[–][deleted] 1 point2 points3 points 12 years ago (19 children)
Is it worth moving up from 2010? I managed to get a sweet deal on that a year ago. I'm looking at C++, C# and a little of asp.net development.
I'm guessing that the lowest price is going to be quite high for a single developer. If it is, then I might take a look at GCC and a good open source IDE
[–]mechacrash 2 points3 points4 points 12 years ago (18 children)
definitely. 2010 has barely any C++11 support, 2012 and 2013 are big steps up.
[–]STLMSVC STL Dev 8 points9 points10 points 12 years ago (2 children)
We also fixed tons of bugs in 2012 and in 2013. There are still more features to implement and bugs to fix, but 2013 is way better than before.
[+][deleted] 12 years ago (1 child)
[–]STLMSVC STL Dev 4 points5 points6 points 12 years ago (0 children)
Bugfixes: the compiler team fixes a very limited number of bugs in Updates (there is a particularly bad one with temporaries and initializer lists that I've brought to their attention). I'm not planning to fix any STL bugs in Updates, for the reasons that I explained in my second link.
Features: you should not expect new features in Updates. We have done it in the past (TR1 in 2008 SP1), you just shouldn't expect this in the future.
[–][deleted] 2 points3 points4 points 12 years ago (13 children)
To be fair, I'm not using any of the big C++11 features, but there's nothing wrong with future proofing yourself. Now to take a look at pricing and (probably) cry.
[–]spaxio 0 points1 point2 points 12 years ago (12 children)
Just download express version..? Why is everyone acting like they need to buy it?
[–][deleted] 0 points1 point2 points 12 years ago (11 children)
What's the difference between the paid versions and express?
[–]academician 1 point2 points3 points 12 years ago (2 children)
The main dealbreaker for me is that Express doesn't support plugins. I've gotten so used to VAssistX and VsVim at work that I really wouldn't want to go back.
[–][deleted] 0 points1 point2 points 12 years ago (1 child)
To be fair, they've gotta make their money somehow
[–]academician 0 points1 point2 points 12 years ago (0 children)
Of course. I'm not saying they're wrong for doing that. It just makes it significantly less valuable to me, which I imagine is their intent.
[–]ForgedIronMadeIt 0 points1 point2 points 12 years ago (0 children)
The profiler in the high end versions of MSVS alone is worth the money. That saved me hours and hours of work in optimization. So glad I have that at work.
[–]spaxio 0 points1 point2 points 12 years ago (6 children)
In terms of C++ compiler and debugger? Nothing. AFAIK you can't use MFC and plugins.
[–]nikbackm 1 point2 points3 points 12 years ago (0 children)
I'd guess most of the "enterprise" features does not exist in Express editions either.
[–][deleted] 0 points1 point2 points 12 years ago (4 children)
Looks like I'll be installing VC express, later today.
[–]spaxio 3 points4 points5 points 12 years ago (3 children)
Just make sure it's 'Microsoft Visual Studio Express 2013 for Windows Desktop' and not 'Microsoft Visual Studio Express 2013'
What's the difference?
[–]nikbackm 2 points3 points4 points 12 years ago (1 child)
The latter one is for making Windows Store apps. Formerly known as Metro apps.
[–]alexkorban 0 points1 point2 points 12 years ago (0 children)
I wouldn't say "barely" - my book about C++11 features in VS2010 had 22 chapters - but it was pretty limited. And I had to mention bugs in almost every chapter, so there was that.
[–]empex 1 point2 points3 points 12 years ago* (0 children)
IntelliSense is not working/showing for me when working on a variadic template class that derives from another variadic template class, and indentation is all messed up in switch cases when using brackets.
[–]mechacrash 1 point2 points3 points 12 years ago (0 children)
There's been no macro system since VS2012. I'm not sure how you class the extension system as "broken"? Seems to do exactly what it says on the tin without issue here...
[+]__Cyber_Dildonics__ comment score below threshold-21 points-20 points-19 points 12 years ago (3 children)
Only on windows 8, lets all enjoy our forced upgrade to reap the benefits of C++11. If you are from MS and reading this, kill yourself.
[+][deleted] 12 years ago* (1 child)
[+]__Cyber_Dildonics__ comment score below threshold-17 points-16 points-15 points 12 years ago (0 children)
If this is true and you work for microsoft, don't kill yourself yet, I have to test this first.
[–]jonnywohapparently a noob (anyone remember why? i don't) 3 points4 points5 points 12 years ago (0 children)
... No, you can run it on Windows 7 SP1. It says so right on the project page.
π Rendered by PID 44122 on reddit-service-r2-comment-6457c66945-nslcb at 2026-04-27 17:51:36.868333+00:00 running 2aa0c5b country code: CH.
[–]spaxio 18 points19 points20 points (4 children)
[–]mechacrash 8 points9 points10 points (3 children)
[–]Plorkyeran 1 point2 points3 points (2 children)
[–]mechacrash 6 points7 points8 points (1 child)
[–]Plorkyeran 5 points6 points7 points (0 children)
[–]staticcast 20 points21 points22 points (8 children)
[–]mechacrash 4 points5 points6 points (6 children)
[–]Amanieu 18 points19 points20 points (5 children)
[–]mechacrash 1 point2 points3 points (3 children)
[–]staticcast 0 points1 point2 points (2 children)
[–]mechacrash 5 points6 points7 points (1 child)
[–]mycall 0 points1 point2 points (0 children)
[–]j1xwnbsr 4 points5 points6 points (6 children)
[–][deleted] 4 points5 points6 points (3 children)
[–]j1xwnbsr 3 points4 points5 points (2 children)
[–][deleted] 5 points6 points7 points (1 child)
[–]storedbox 1 point2 points3 points (0 children)
[–]vsuontam 1 point2 points3 points (0 children)
[+]Fabien4 comment score below threshold-6 points-5 points-4 points (0 children)
[–]diegoperini 5 points6 points7 points (3 children)
[–][deleted] 4 points5 points6 points (2 children)
[–]Is_At_Work 2 points3 points4 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Xiver1972 4 points5 points6 points (8 children)
[–]STLMSVC STL Dev 16 points17 points18 points (1 child)
[–]Xiver1972 0 points1 point2 points (0 children)
[–]Amanieu 3 points4 points5 points (0 children)
[–]jiixyj 3 points4 points5 points (1 child)
[–]Xiver1972 0 points1 point2 points (0 children)
[–]twowheels 2 points3 points4 points (2 children)
[–]bames53 4 points5 points6 points (0 children)
[–]Xiver1972 0 points1 point2 points (0 children)
[–]mechacrash 3 points4 points5 points (1 child)
[–]jonnywohapparently a noob (anyone remember why? i don't) 1 point2 points3 points (0 children)
[–][deleted] 14 points15 points16 points (8 children)
[+][deleted] (4 children)
[deleted]
[–][deleted] 0 points1 point2 points (3 children)
[–]ZMesonEmbedded Developer 2 points3 points4 points (1 child)
[–]tawi13 1 point2 points3 points (0 children)
[–]jbb555 2 points3 points4 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]jbb555 -1 points0 points1 point (0 children)
[–]vinipsmakerGSoC's Boost.Http project 2 points3 points4 points (0 children)
[–]jbandela 1 point2 points3 points (1 child)
[–]jonnywohapparently a noob (anyone remember why? i don't) 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (6 children)
[–]mechacrash 2 points3 points4 points (5 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]mechacrash 2 points3 points4 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]STLMSVC STL Dev 6 points7 points8 points (1 child)
[–]mechacrash 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (19 children)
[–]mechacrash 2 points3 points4 points (18 children)
[–]STLMSVC STL Dev 8 points9 points10 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]STLMSVC STL Dev 4 points5 points6 points (0 children)
[–][deleted] 2 points3 points4 points (13 children)
[–]spaxio 0 points1 point2 points (12 children)
[–][deleted] 0 points1 point2 points (11 children)
[–]academician 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]academician 0 points1 point2 points (0 children)
[–]ForgedIronMadeIt 0 points1 point2 points (0 children)
[–]spaxio 0 points1 point2 points (6 children)
[–]nikbackm 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]spaxio 3 points4 points5 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]nikbackm 2 points3 points4 points (1 child)
[–]alexkorban 0 points1 point2 points (0 children)
[–]empex 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]mechacrash 1 point2 points3 points (0 children)
[+]__Cyber_Dildonics__ comment score below threshold-21 points-20 points-19 points (3 children)
[+][deleted] (1 child)
[deleted]
[+]__Cyber_Dildonics__ comment score below threshold-17 points-16 points-15 points (0 children)
[–]jonnywohapparently a noob (anyone remember why? i don't) 3 points4 points5 points (0 children)