Problem nprime
User cobnet
Submission Time 2024-02-07 16:20:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nprime.cpp: In function ‘int main()’:
nprime.cpp:8:20: error: invalid cast from type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to type ‘int’
8 | int john = int(jar);
| ^
nprime.cpp:9:12: error: invalid use of non-static member function ‘void std::basic_ifstream<_CharT, _Traits>::close() [with _CharT = char; _Traits = std::char_traits<char>]’
9 | alabaster.close;
| ~~~~~~~~~~^~~~~
In file included from nprime.cpp:2:
/usr/include/c++/9/fstream:730:7: note: declared here
730 | close()
| ^~~~~
nprime.cpp:14:9: error: expected ‘;’ before ‘if’
14 | down++
| ^
| ;
15 | if (down == 0 || down == 1) {
| ~~