Visual Studio 2002 problem  | |
January 26th, 2006, 05:16 PM
|
#1 (permalink)
| | Ultimate Member
Join Date: Jun 2004 Location: England
Posts: 1,407
| Visual Studio 2002 problem
Hey,
I'm running visual C++ 7 from my Visual Studio.net Academic Edition 2002.
According to this site, there is a fix to a problem I have on Version 10. http://www.infoworld.com/article/05/...lstudio_1.html Quote: |
Yet another fix applies to building console-based applications that use a command-line interface. “When you build a command-line application and compile and run that application from Visual Studio, sometimes the output window closes too quickly to see the results of your program” during debug mode, Keller said. “Now when you run a command-line app from within Visual Studio, the user will receive a ‘Press any key to continue’ prompt.”
| My output window closes too quickly on version 7.
Is there some way that I can rectify this? |
| |
January 27th, 2006, 02:39 PM
|
#2 (permalink)
| | Banned
Join Date: Jan 2004 Location: Earth
Posts: 420
|
I think it is something like: |
| |
January 30th, 2006, 05:40 PM
|
#3 (permalink)
| | Ultimate Member
Join Date: Jun 2004 Location: England
Posts: 1,407
| Quote: |
Originally Posted by Iturea I think it is something like: | Thanks.
I'm something of a novice at C++. Can you tell me how I'd insert that into the listing below? Quote:
#include <string>
#include <iostream>
using namespace std;
void writename(); //prototypes (function declarations)
void writetitle();
int main()
{
writetitle(); //function calls
writename();
return 0;
}
void writename() //function definition
{
string name = "Mike McGrath";
cout << name << endl;
}
void writetitle() //function definition
{
string title = "C++ Programming in easy steps";
cout << title << " by ";
}
| |
| |
January 30th, 2006, 06:33 PM
|
#4 (permalink)
| | Banned
Join Date: Jan 2004 Location: Earth
Posts: 420
|
Just put it before the return 0; line in main() |
| |
January 30th, 2006, 06:53 PM
|
#5 (permalink)
| | Ultimate Member
Join Date: Jun 2004 Location: England
Posts: 1,407
| Quote: |
Originally Posted by Iturea Just put it before the return 0; line in main() | Thank you very much.
If there were more people like you, the world would be a better place.
God bless you!
And your children!!
And your children's children!!! |
| |
January 30th, 2006, 06:54 PM
|
#6 (permalink)
| | Ultimate Member
Join Date: Jun 2004 Location: England
Posts: 1,407
|
Now, is there a way to permanently build it into Visual Studio 2002 automatically, something in the settings perhaps? |
| |
January 31st, 2006, 09:34 AM
|
#7 (permalink)
| | Banned
Join Date: Jan 2004 Location: Earth
Posts: 420
| Quote: |
Originally Posted by 27 Now, is there a way to permanently build it into Visual Studio 2002 automatically, something in the settings perhaps? | Sorry, but I never experienced your problem before. Version 2002 has always automatically paused in debug mode for me. Just make sure next to the run button it says debug and not release. I have no idea why it is not working for you.
Thanks for blessing me and my children!  |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |