由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 数据类型判断
相关主题
C 中的typedef 一问Re: C里面从一个string取出中间一部分生成新的string
Pattern matchingc++ string 一问
[合集] c++的题请问 distance between two strings 是如何定义的?
java string stream问个programming style 的问题
计算围棋棋盘合法图案的源代码How to change a string under gdb prompt
expression in Java关于文件命名
c++中把double类型转化为string用那个函数a simple question regarding string copy in C
[转载] java问题:如何match两个正规表达式一道C++面试编程题
相关话题的讨论汇总
话题: string话题: wwws4444话题: integar话题: 1111e话题: strings
进入Programming版参与讨论
1 (共1页)
G***G
发帖数: 16778
1
given a string, how to know its data type using c or c#?
for example, '5555', output is integar
'wwws4444' is string
'1111E-6' is long
s**m
发帖数: 1564
2
regular expression can help to a certain degree, however, it may not be a
final oasis if strings are very complicated.
but do you really have to do it this way? where are the data from and why do
they all come in as strings?
a****l
发帖数: 8211
3
there is no universal and fail-proof way. You have to have assumptions and
requirements, otherwise the possibilities is just endless.
E.g., tell me, what is "ABC555"? is it a string or hex number? If you can'
t figure it out with your brain, how can you assume the computer can?

【在 G***G 的大作中提到】
: given a string, how to know its data type using c or c#?
: for example, '5555', output is integar
: 'wwws4444' is string
: '1111E-6' is long

1 (共1页)
进入Programming版参与讨论
相关主题
一道C++面试编程题计算围棋棋盘合法图案的源代码
c#中,如何写1个for loop得出"aa","ab","ac",..."zz"的所有组合?expression in Java
哪儿有经典的C++ programing 习题集嘛?c++中把double类型转化为string用那个函数
About Longest repeated substring[转载] java问题:如何match两个正规表达式
C 中的typedef 一问Re: C里面从一个string取出中间一部分生成新的string
Pattern matchingc++ string 一问
[合集] c++的题请问 distance between two strings 是如何定义的?
java string stream问个programming style 的问题
相关话题的讨论汇总
话题: string话题: wwws4444话题: integar话题: 1111e话题: strings