Is there ANY compiler that compiles this?
double* value(nullptr);
I've never seen that, but the things I haven't seen outweigh the things I've seen, so take it with a grain of salt. Is that this?
double* value = 0;
There are compilers and there are IDEs. IDEs like Code Blocks and Visual Studio USE compilers. They are not compilers. That's why Code Blocks has two installations (with and without the compiler).
You can always install Visual Studio on an external drive if you don't have room on your laptop. If things don't compile with Code Blocks, that seems like the easiest thing to do.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
Go into C::B and open up Settings/Compiler and Debugger Settings and select GNU GCC Compiler at the top (assuming you load up C::B on your laptop with the default compiler). Select the Compiler Settings tab, and go down about 9 entries to "Have g++ follow the coming C++0x ISO C++ language standard [-std=c++0x]." That should allow you to use the new stuff.
jonsca
Quantitative Phrenologist
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
Moschops
Practically a Master Poster
620 posts since Sep 2008
Reputation Points: 258
Solved Threads: 117
@OP I didn't realize that the introduction of stuff was staggered like that, so unless you have the 4.6 my suggestion won't work. Apologies.
jonsca
Quantitative Phrenologist
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
It's like Duke Nukem Forever. It'll get here when it gets here :)
Moschops
Practically a Master Poster
620 posts since Sep 2008
Reputation Points: 258
Solved Threads: 117
What about the express edition of Visual C++? It's free, and it ought to be a fair bit smaller than the full version of Visual Studio. What's more, it supports all the same CLI and C++0x code as the full version, so far as I know.
embooglement
Junior Poster in Training
86 posts since Jul 2010
Reputation Points: 25
Solved Threads: 13
gcc 4.6 hasn't been released yet. I checked on http://gcc.gnu.org/gcc-4.6/ and there are no stable builds listed on that page. You'd have to get a nightly release (I don't know where to find those) of the prerelease code. I'm not sure what the status of the mingw (the Windows port of gcc) is for 4.6, but since it's even less likely to be ready, you'd probably have to build the Linux nightly build under MSYS ( http://www.mingw.org/wiki/MSYS ).
I would get the latest mingw release (v.4.5.2) which is simple enough to set up (there's an installer now for Windows) and use that with Code::Blocks. You won't get all of the experimental keywords from C++0x, but using that website that Moschops posted, you can see how many of them are already available.
jonsca
Quantitative Phrenologist
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
If the install was right, you can use gcc without an IDE. Do a quick "Hello World" program and compile it from the command line with no IDE:
gcc HelloWorld.c -o HelloWorld
Run it and verify it works. Then and only then point Code Blocks to it.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
That looks like the ForTran version. You want the C++ version.
Moschops
Practically a Master Poster
620 posts since Sep 2008
Reputation Points: 258
Solved Threads: 117
>> Yesterday I went on the gcc website and downloaded the 4.6 snapshot but inside was just a bunch of files.
That's the downside of installing something before the "official release". With the official releases, usually there is a big README with options for installers, etc.
If you get it from Subversion or before they've tidied it all up with instructions, you sometimes get just a big zip file or whatever, but usually there's SOMETHING there with some explanation of what to do. You may or may not have to "build your own". Anyway, those files go somewhere, so if you have time, you may want to install the last stable version, look at where everything ends up, uninstall it, then look at the new files and see if they "match" and stick them there.
Bottom line is if you're willing to put in the time, something as big as gcc is going to have instructions somewhere, but whenever you aren't working with the "official, stable" release, you have to expect that it may take more than a few clicks. I'm talking about projects in general, not just gcc.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
Moschops
Practically a Master Poster
620 posts since Sep 2008
Reputation Points: 258
Solved Threads: 117