File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -579,11 +579,11 @@ template <float a> class E {}; // ERROR: 别闹!早说过只能是整数类型
579579class StackInt
580580{
581581public:
582- void push(Int v);
583- Int pop();
584- Int Find(Int x)
582+ void push(int v);
583+ int pop();
584+ int Find(int x)
585585 {
586- for(Int i = 1 ; i <= size; )
586+ for(int i = 0 ; i < size; ++i )
587587 {
588588 if(data[ i] == x) { return i; }
589589 }
@@ -598,11 +598,11 @@ public:
598598class StackFloat
599599{
600600public:
601- void push(Float v);
602- Float pop();
603- Int Find(Float x)
601+ void push(float v);
602+ float pop();
603+ float Find(float x)
604604 {
605- for(Int i = 1 ; i <= size; )
605+ for(int i = 0 ; i < size; ++i )
606606 {
607607 if(data[ i] == x) { return i; }
608608 }
@@ -634,9 +634,9 @@ class Stack
634634public:
635635 void push(T v);
636636 T pop();
637- Int Find(T x)
637+ T Find(T x)
638638 {
639- for(Int i = 0; i <= size; ++i)
639+ for(int i = 0; i < size; ++i)
640640 {
641641 if(data[ i] == x) { return i; }
642642 }
You can’t perform that action at this time.
0 commit comments