注册 登录
编程论坛 C++教室

为什么出现这个错误 ld returned 1 exit status 请大家帮帮忙

哟嚯嚯 发布于 2014-11-29 16:12, 526 次点击
#include <iostream>
#include <string>
#include <cctype>
#include <vector>
#include <cstring>
#include <stdexcept>
using namespace std;
   
char daxiao(string a1){
    char c='N';
    for(auto b1:a1)
        if(isupper(b1)){
            c='Y';
            break;
        }
    return c;
}


int main(){

    string a;
    char b;
    cout<<"shuru"<<endl;
    cin>>a;
    b=daxiao(a);
    cout<<b<<endl;
    return 0;
}
3 回复
#2
天使梦魔2014-11-29 20:33
for(auto b1:a1)????
#3
stop12042014-11-30 08:05
正常编译,测试正常
#4
stop12042014-11-30 08:06
回复 2 楼 天使梦魔
C++ 11的新foreach用法
1