Хорошо, это становится глупо, у меня Microsoft Visual Studio 2008, работала нормально, теперь, когда я запускаю программу .cpp, мои окна командной строки имеют цвет по умолчанию серый, когда у меня изначально был зеленый лайм для вывода.
Сообщение об ошибке:
'Testing.exe': Loaded 'C:\Users\codebox\Documents\Visual Studio 2008\Projects\Testing\Debug\Testing.exe', Symbols loaded.
'Testing.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'Testing.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'Testing.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'Testing.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcp90d.dll'
'Testing.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcr90d.dll'
The program '[2644] Testing.exe: Native' has exited with code 0 (0x0).
Почему в IDE загружается Testing.exe, я
просто хотите протестировать .cpp?
Код ниже работает нормально, за исключением того, что теперь я получаю сообщение об ошибке выше, я подозреваю, IDE:
// This program will assist the High Adventure Travel Agency
// in calculating the costs of their 4 major vacation packages.
#include <iostream>
#include <iomanip>
using namespace std;
// Constants for the charges.
const double CLIMB_RATE = 350.0; // Base rate - Devil's Courthouse
const double SCUBA_RATE = 1000.0; // Base rate - Bahamas
const double SKY_DIVE_RATE = 400.0; // Base rate - Sky diving
// This program is a driver for testing the showFees function.
#include <iostream>
using namespace std;
// Prototype
void showFees(double, int);
int main()
{
// Constants for membership rates
const double ADULT = 40.0;
const double SENIOR = 30.0;
const double CHILD = 20.0;
// Perform a test for adult membership.
cout << "Testing an adult membership...\n"
<< "Calling the showFees function with arguments "
<< ADULT << " and 10.\n";
showFees(ADULT, 10);
// Perform a test for senior citizen membership.
cout << "\nTesting a senior citizen membership...\n"
<< "Calling the showFees function with arguments "
<< SENIOR << " and 10.\n";
showFees(SENIOR, 10);
// Perform a test for child membership.
cout << "\nTesting a child membership...\n"
<< "\nCalling the showFees function with arguments "
<< CHILD << " and 10.\n";
showFees(CHILD, 10);
return 0;
}
//*****************************************************************
// Definition of function showFees. The memberRate parameter *
// the monthly membership rate and the months parameter holds the *
// number of months. The function displays the total charges. *
//*****************************************************************
void showFees(double memberRate, int months)
{
cout << "The total charges are $"
<< (memberRate * months) << endl;
}
Как парень может получить свой код, когда это происходит?
Или что я должен изменить, я просто хочу написать код на C ++ и протестировать мой код, и все, а не возиться с чертовой IDE.
Решение:
Ctrl + 5
http://msdn.microsoft.com/en-us/library/ms235629.aspx
Построить и изучить программу
1
On the Build menu, click Build Solution.
The Output window displays information about the compilation
прогресс, например, местоположение
журнал сборки и сообщение, которое
заявляет статус сборки.
2.
On the Debug menu, click Start without Debugging.
If you used the sample program, a command window is displayed and
показывает, являются ли определенные целые числа
найден в наборе.