| Problem | nprime |
|---|---|
| User | tinyqwertyIII |
| Submission Time | 2026-05-08 14:14:25 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
nprime.cpp: In function ‘int main()’:
nprime.cpp:19:14: error: conflicting declaration ‘std::ofstream file’
19 | ofstream file("PRIME.OUT");
| ^~~~
nprime.cpp:8:14: note: previous declaration as ‘std::ifstream file’
8 | ifstream file("PRIME.IN");
| ^~~~
nprime.cpp:20:10: error: no match for ‘operator<<’ (operand types are ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} and ‘long long int’)
20 | file << b;
| ~~~~ ^~ ~
| | |
| | long long int
| std::ifstream {aka std::basic_ifstream<char>}
nprime.cpp:20:10: note: candidate: ‘operator<<(int, long long int)’ <built-in>
20 | file << b;
| ~~~~~^~~~
nprime.cpp:20:10: note: no known conversion for argument 1 from ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} to ‘int’
In file included from /usr/include/c++/9/rege