C++ compiling with MS Visual Studio 2012

Soldato
Joined
8 Sep 2003
Posts
23,008
Location
150 yds from OcUK
Hi guys

I have decided to take it upon myself to self-teach myself programming.

I decided to jump in head first and go straight to c++ :)

Anyway I have been reading the basics etc and created three quite simple console programs based on integers and strings.

1. A simple program that you enter a number and it doubles it.
2. A simple currency converter - you enter the exchange and then enter a value and it works out the exchanged rate.
3. A simple data input method that asks you questions like what is your name, age etc and then uses that in the following responses etc.

None of it is cutting edge lol.

But I have compiled the .exe and they run fine on a PC with Visual Studio 2012 installed but didn't work on a PC without it - I got a work around by installing the latest c++ runtime library from Microsofts site.

But I cannot expect users to install the library as 95% of people won't know that they need to do this. Is there any way to embed the library in the .exe or make an installer for it.
 
Soldato
OP
Joined
8 Sep 2003
Posts
23,008
Location
150 yds from OcUK
I firstly did it in debug mode, but then changed it to release mode, and no change. Still the same issue.

Well if I clicked on the configuration Manager option and then changed the active solution to Release and the dropdown to release configuration too.

compiled_zps28d65d51.png


P.S. before you say anything I have just improved my code to
Code:
cout << "this is costing you " << exchange(x,y) << " pounds" << endl;
 
Soldato
OP
Joined
8 Sep 2003
Posts
23,008
Location
150 yds from OcUK
Perfect, thank you very much. I appreciate that!

It has made my .exe around 1mb which is high for a console app. haha, but its just me playing and learning, so doesn't matter. Eventually I will want to bundle the library files in with an installer.
 
Soldato
OP
Joined
8 Sep 2003
Posts
23,008
Location
150 yds from OcUK
Yup, I just installed the latest, not realising that I would be in this situation.

I have the 30 day trial, what is best to use after the trial has expired. I don't fancy spending £400 on something that will just be used for fun.

And note my libraries. Loads of them.

library_zps0403f136.png
 
Back
Top Bottom