Compile Error

foo.cc:1:2: error: invalid preprocessing directive #clude; did you mean #include?
    1 | #clude<bits/stdc++.h>
      |  ^~~~~
      |  include
foo.cc:3:1: error: ‘string’ does not name a type
    3 | string s,t;
      | ^~~~~~
foo.cc:4:1: error: ‘itn’ does not name a type; did you mean ‘int’?
    4 | itn cnt;
      | ^~~
      | int
foo.cc: In function ‘int main()’:
foo.cc:7:17: error: ‘cin’ was not declared in this scope
    7 |         getline(cin,s);
      |                 ^~~
foo.cc:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
  +++ |+#include <iostream>
    1 | #clude<bits/stdc++.h>
foo.cc:7:21: error: ‘s’ was not declared in this scope
    7 |         getline(cin,s);
      |                     ^
foo.cc:7:9: error: ‘getline’ was not declared in this scope
    7 |         getline(cin,s);
      |         ^~~~~~~
foo.cc:8:21: error: ‘t’ was not declared in this scope
    8 |         getline(cin,t);
      |                     ^
foo.cc:12:17: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
   12 |                 cnt++;
      |                 ^~~
      |                 int
foo.cc:14:9: error: ‘cout’ was not declared in this scope
   14 |         cout<<cnt<<endl;
      |         ^~~~
foo.cc:14:9: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
foo.cc:14:15: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
   14 |         cout<<cnt<<endl;
      |               ^~~
      |               int
foo.cc:14:20: error: ‘endl’ was not declared in this scope
   14 |         cout<<cnt<<endl;
      |                    ^~~~
foo.cc:1:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’?
  +++ |+#include <ostream>
    1 | #clude<bits/stdc++.h>

信息

递交者
类型
递交
题目
P1087 3-6 查找资料
语言
C++
递交时间
2024-07-16 08:08:45
评测时间
2024-07-16 08:08:45
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes