Skip to content

Commit 5723b1b

Browse files
authored
修改例子
例中的find应该返回元素的index,所以其签名应该是 `int Find(T x)` 而不是`T Find(T x)`
1 parent 9c34df8 commit 5723b1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ class StackFloat
600600
public:
601601
void push(float v);
602602
float pop();
603-
float Find(float x)
603+
int Find(float x)
604604
{
605605
for(int i = 0; i < size; ++i)
606606
{
@@ -634,7 +634,7 @@ class Stack
634634
public:
635635
void push(T v);
636636
T pop();
637-
T Find(T x)
637+
int Find(T x)
638638
{
639639
for(int i = 0; i < size; ++i)
640640
{

0 commit comments

Comments
 (0)