由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - C++ question
相关主题
An algorithm question.菜鸟读C++ STL源程序的疑问
为毛本版就整天争论语言呢。。。请教一个MS Linked List的问题
请教一个C++ typedef的问题问一个关于C++指针的问题
两个看来相似的问题问一个有关C++里面list的问题。
A C++ STL questiontypedef
post increment[合集] 关于C++ STL的list的一个问题
C++ Q96: function inheritance (转载)Initialization list的一个问题
double's equality一个C#似疑模板问题
相关话题的讨论汇总
话题: list话题: c++话题: equal话题: type话题: suppose
进入Programming版参与讨论
1 (共1页)
z*y
发帖数: 1311
1
Suppose to design a List template...
Then need "List::find(T d)", e.g. if the list has an element of "d" return
true.
Then the comparison of whether two elements are equal really depends on type
T. so what will be the way to do this?
Thank you for your suggestion.
b********n
发帖数: 609
2
完全看class T的operator == 怎么写的呀,和你有什么关系。

type

【在 z*y 的大作中提到】
: Suppose to design a List template...
: Then need "List::find(T d)", e.g. if the list has an element of "d" return
: true.
: Then the comparison of whether two elements are equal really depends on type
: T. so what will be the way to do this?
: Thank you for your suggestion.

a****l
发帖数: 8211
3
"Equal" means "A>B" is false and "B>A" is false.

type

【在 z*y 的大作中提到】
: Suppose to design a List template...
: Then need "List::find(T d)", e.g. if the list has an element of "d" return
: true.
: Then the comparison of whether two elements are equal really depends on type
: T. so what will be the way to do this?
: Thank you for your suggestion.

1 (共1页)
进入Programming版参与讨论
相关主题
一个C#似疑模板问题A C++ STL question
C++ subclass questionpost increment
Listing files under a directory in C++C++ Q96: function inheritance (转载)
初学者问个 C++ constructor 问题吧double's equality
An algorithm question.菜鸟读C++ STL源程序的疑问
为毛本版就整天争论语言呢。。。请教一个MS Linked List的问题
请教一个C++ typedef的问题问一个关于C++指针的问题
两个看来相似的问题问一个有关C++里面list的问题。
相关话题的讨论汇总
话题: list话题: c++话题: equal话题: type话题: suppose