Please support our C++ advertiser: Programming Forums
![]() |
•
•
Join Date: Mar 2004
Posts: 12
Reputation:
Rep Power: 5
Solved Threads: 0
how would you make a simple exe application for something like this in vis c++. so that you could send it self contained and a person double clicks it and it runs. please show the code and where you would enter it.
thanks
#include <iostream>
using std::cout;
using std::cin;
int main()
{
int a, b, sum;
cout << "enter first number\n";
cin >> a;
cout << "enter second number\n";
cin >> b;
sum = a + b;
cout << "sum is " << sum << std::endl;
return 0;
}
thanks
#include <iostream>
using std::cout;
using std::cin;
int main()
{
int a, b, sum;
cout << "enter first number\n";
cin >> a;
cout << "enter second number\n";
cin >> b;
sum = a + b;
cout << "sum is " << sum << std::endl;
return 0;
}
•
•
Join Date: Mar 2004
Posts: 11
Reputation:
Rep Power: 5
Solved Threads: 1
To do this, create a new project (workspace if using vc++ 6) add a new code file, paste your code in there, compile (I believe F7 in vc++ 6, or ctrl-shift-B in vs.net), the exe will be in your project folder, send that to anyone with windows, and it will be able to run, you aren't using anything that needs to be installed.
•
•
Join Date: Mar 2004
Posts: 76
Reputation:
Rep Power: 5
Solved Threads: 2
visual studio usually ships 'neutered', meaning you can't build standalone apps to distribute. depending on what version u have, this is may or may not be true. usually the expensive, ie. Professional Version, lets u build standalone apps. this is done by going to Build->Configurations and selecting Release mode instead of debug mode.
•
•
Join Date: Mar 2004
Posts: 11
Reputation:
Rep Power: 5
Solved Threads: 1
Debug mode is standalone, the exe just contains debugging information, that allows you to step through the code when you set a breakpoint inside the IDE. Even Academic versions allow you to create standalone apps. The license agreement though says that you can't sell any app created by that version of the IDE (I know I got the academic version, and I can send you a C++ OpenGL program compiled in Debug mode that will run standalone)
•
•
Join Date: Mar 2004
Posts: 12
Reputation:
Rep Power: 5
Solved Threads: 0
i thought i had the "neutered" version as well. i have enterprise edition and used to have pro i think and could do it easy enough in visual basicwhich has the option to make an exportable exe option. but here in vis c++ i can't seem to do it. file>new>win 32 con app>empty project and such with no luck in make that exe. i haave check the project files and only have .cpp dsp dsw opt and html doc. no exe...
•
•
Join Date: Mar 2004
Posts: 11
Reputation:
Rep Power: 5
Solved Threads: 1
Yeah exactly what infamous said it will be in you Debug folder.
@infamous:It may have been that way in previous versions of visual studio, i'm not sure never had it before, and now I get vs.net free from school through the msdnaa. This is the clearest source i could find on the license restrictions http://www.ben.edu/programs/business/msdnaa/
Basically it says I can only use my copy of visual studio .net 2003 for instructional and non-commercial use. (i.e. can't use it to make stuff to sell, would have to buy at least the professional version for that.)
@infamous:It may have been that way in previous versions of visual studio, i'm not sure never had it before, and now I get vs.net free from school through the msdnaa. This is the clearest source i could find on the license restrictions http://www.ben.edu/programs/business/msdnaa/
Basically it says I can only use my copy of visual studio .net 2003 for instructional and non-commercial use. (i.e. can't use it to make stuff to sell, would have to buy at least the professional version for that.)
![]() |
Similar Threads
Other Threads in the C++ Forum
- Explorer.Exe - Application Error (Windows NT / 2000 / XP / 2003)
- ActiveMovie Window: explorer.exe - Application Error (Windows NT / 2000 / XP / 2003)
- Explorer.EXE-Application Error????? (Windows NT / 2000 / XP / 2003)
- Help in error:IEXPLORE.EXE - Application Error (Web Browsers)
- Iexplore.exe application failed?? (Web Browsers)
Other Threads in the C++ Forum
- Previous Thread: For the newbees (like myself)
- Next Thread: I need help on my 'address book' assignment!
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode