鱼C论坛

 找回密码
 立即注册
查看: 1853|回复: 1

编程的莫名小错误

[复制链接]
发表于 2018-11-14 16:54:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
using namespace std;
static int x=[](){std::ios::sync_with_stdio(false);cin.tie(0);return 0;}();

          class Solution
{
public:
        bool ispalindrome(string s)
        {
                 if(s.empty()) return true;
                 int s_size=s.size();
                 int i=0;
                 while(i<s_size)
                   {  
                     if(!isalnum(s[s_size])){s_size__:continue; }
                     if(!isalnum(s[i])){i++;continue ; }
                     if(tolower(s[i++])!=tolower(s[s_size--])) return false;
                        }
                            return 0;
                }
        };
        int main()
        {  
            string s="A man, a plan, a canal: panama";
            cout<<Solution().ispalindrome(s)<<endl;
            return 0;
        }
    代码附上

怎末会错啊

怎末会错啊
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2018-11-14 20:25:20 | 显示全部楼层
VC6是1998年出的IDE。而C++11标准是2011年提出的,实现它的编译器理论上应当在2011年之后。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-6-26 22:27

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表