由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Exceptional C++ code question
相关主题
C++ exception handling 一问请教:函数后面的 throw() 有意义么?
Two questions about handling exceptions in C++[合集] Exception Handling in C
C++ Q15: throw《Exceptional C++ Style》这本书值得看么?
C++ Exception Questiondoes this line get executed after exception caught
Why does default exception use char *?C++ namespace 弱问
关于 exception 的一个问题c++的问题
A try-catch problem in C++C++ 用户定义exception的标准用法是什么?
C++: exception: out-of-order execution?大家对 exception 都是怎么处理的?
相关话题的讨论汇总
话题: char话题: toupper话题: c2话题: c1话题: token
进入Programming版参与讨论
1 (共1页)
j***i
发帖数: 1278
1
I copy the following code from the book and complied in gcc
struct ci_char_traits : public char_traits
// here it have errors
//
//
// error: expected template-name before ‘<’ token
// error: expected `{' before ‘<’ token
// error: expected unqualified-id before ‘<’ token
{
static bool eq( char c1, char c2 )
{ return toupper(c1) == toupper(c2); }
static bool lt( char c1, char c2 )
{ return toupper(c1) < toupper(c2); }
static int compare( const char* s1,
t****t
发帖数: 6806
2
public std::char_traits

【在 j***i 的大作中提到】
: I copy the following code from the book and complied in gcc
: struct ci_char_traits : public char_traits
: // here it have errors
: //
: //
: // error: expected template-name before ‘<’ token
: // error: expected `{' before ‘<’ token
: // error: expected unqualified-id before ‘<’ token
: {
: static bool eq( char c1, char c2 )

1 (共1页)
进入Programming版参与讨论
相关主题
大家对 exception 都是怎么处理的?Why does default exception use char *?
请教一下,exception时,destructor一定会被调用么?关于 exception 的一个问题
请问C++ exception后如何清理function stack上的内存资源?A try-catch problem in C++
C++ 的 exception handlingC++: exception: out-of-order execution?
C++ exception handling 一问请教:函数后面的 throw() 有意义么?
Two questions about handling exceptions in C++[合集] Exception Handling in C
C++ Q15: throw《Exceptional C++ Style》这本书值得看么?
C++ Exception Questiondoes this line get executed after exception caught
相关话题的讨论汇总
话题: char话题: toupper话题: c2话题: c1话题: token