File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -579,11 +579,11 @@ template <float a> class E {}; // ERROR: 别闹!早说过只能是整数类型
579
579
class StackInt
580
580
{
581
581
public:
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)
585
585
{
586
- for(Int i = 1 ; i <= size; )
586
+ for(int i = 0 ; i < size; ++i )
587
587
{
588
588
if(data[ i] == x) { return i; }
589
589
}
@@ -598,11 +598,11 @@ public:
598
598
class StackFloat
599
599
{
600
600
public:
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)
604
604
{
605
- for(Int i = 1 ; i <= size; )
605
+ for(int i = 0 ; i < size; ++i )
606
606
{
607
607
if(data[ i] == x) { return i; }
608
608
}
@@ -634,9 +634,9 @@ class Stack
634
634
public:
635
635
void push(T v);
636
636
T pop();
637
- Int Find(T x)
637
+ T Find(T x)
638
638
{
639
- for(Int i = 0; i <= size; ++i)
639
+ for(int i = 0; i < size; ++i)
640
640
{
641
641
if(data[ i] == x) { return i; }
642
642
}
You can’t perform that action at this time.
0 commit comments