• Advertisement
Sign in to follow this  

c++11 and VS2010 options

This topic is 1767 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm looking for an option (easy option) to use c++11 range-for loops in VS2010.

 

On my primary machine I have Windows 7 and VS2012 (which I upgraded to specifically to get more of the C++11 features).    But my "real job" has me traveling quite a bit lately and at the momment I'm in a hotel in London (I live in the states).    While my work laptop has 7 on it, I can't really install VS on it to do a non-work project.    I had an old laptop I brought along thinking I could keep working on my project, but unfortunatly it has WinXP and can't get VS2012 installed on it.

 

So I'm back to VS2010, but it doesn't support everything thats already in my code.    Google has sadly failed me in looking for a way to get range-for support into 2010, so I hoping someone has a suggestion.    I'd really like to be able to keep working on my project while I'm in the hotel, but I certainly don't want to go through all my existing code to replace all my loops...(espcially since when I get home I'd want to switch them back...)

 

Thanks

B

 

Share this post


Link to post
Share on other sites
Advertisement

Do you use MS-specific extensions? If no, you may try MinGW, which has pretty good support for C++11, along with, e.g., Qt Creator, or Eclipse.

Share this post


Link to post
Share on other sites
If you're using the VS2010 C++ compiler, then there are very few options beyond what you already know.
One possible option worth considering is to use something like WinMerge and maintain a VS2010 codebase and a VS2012 codebase. Rather than copying back and forth each time, you merge between each time. Obviously this will become unsuitable as the project reaches a certain size. It's far from ideal, but I've been there as a temporary solution.
Other than that, you're stuck with doing what many of us do, and that's to write code for the lowest common denominator, which means saying goodbye to those C++11 features... for now.
If that's really unpalatable to you - get a new laptop. Edited by iMalc

Share this post


Link to post
Share on other sites
- Many workplaces would not mind someone installing an official, free-of-charge programming tool straight from Microsoft to learn a potentially valuable business skill on their free time. Why not mail your IT guys and simply ask if they are cool with that?

- Switch to a different compiler like MinGW that does support those features on your old laptop.

- Install Win7 on your old laptop to get VS2012 on it.

Share this post


Link to post
Share on other sites

Thank you all for the suggestions.   I really do appreciate it.

 

A few responses...

 

@iMalc and @Stroppy Katamari....yes new laptop/getting Win7 on this laptop will be the plan most likely...doesn't help for this trip though...of course since its a little after midnight tonight and just wrapped up today's meetings that may not matter anyway...

 

@Stroppy and @ppodsiadly...I will checkout MinGW in general though...as I'm not using anything MS specific (at least not on purpose)

 

@eddie....yeah I was aware of that, but really didn't want to change all my code.   I considered using that as a macro in replace for what I wanted, but that just seemed ugly.

 

And lastly....@Stroppy....technically I have admin rights on my work laptop so I *could* install it without having to talk to IT, but considering I left development over 10 years ago as a profession it would be a challenge to explain to the company why that would be of value to them....but far more importantly...per my employee aggreement (which granted it easily challenged in court) anything done on company property becomes IP of the company and I'd rather not give them my game for free :)

 

So it seems like I'm left with...

1) Change IDE

2) Change my code (either LCD, or using function like eddie suggested)

3) Upgrade my "travel" system

 

Kinda what I thought (although to be honest I really hadn't considered the IDE swithc before, not sure why)....but thought it was worth the chcek.

 

Thank you all....

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement