注册 登录
编程论坛 VC++/MFC

VC++怎样关闭和打开调试器

wei318525 发布于 2012-10-20 10:25, 513 次点击
#include<iostream>
#include<string>
using namespace std;

int main()
{
    string currword,preword;
    cout << "Enter some words:" << endl;
    while(cin >> currword)
    {
        #ifndef NDEBUG
        cout << currword << " ";
        #endif
        if(preword == currword)
            break;
        else
            preword = currword;
    }
    cout << "currword: " << currword << endl;
    cout << "preword: " << preword << endl;
    if(currword == preword && !currword.empty())
        cout << "The repeated word is : " << currword << endl;
    else
        cout << "No repeated word!" << endl;
    return 0;
}
1 回复
#2
newdos2012-10-20 11:31
网上搜索“VC 调试器使用教程”
1