Borderou de evaluare (job #2483828)
Utilizator | Data | 30 octombrie 2019 13:28:58 | |
---|---|---|---|
Problema | Heapuri | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:41:17: error: field 'sb' has incomplete type 'stat'
struct stat sb;
^~
main.cpp:41:12: note: forward declaration of 'struct stat'
struct stat sb;
^~~~
main.cpp: In constructor 'parser::parser(const char*)':
main.cpp:13:34: error: 'O_RDONLY' was not declared in this scope
int fd = open(file_name, O_RDONLY);
^~~~~~~~
main.cpp:13:42: error: 'open' was not declared in this scope
int fd = open(file_name, O_RDONLY);
^
main.cpp:15:22: error: 'fstat' was not declared in this scope
fstat(fd, &sb);
^
main.cpp:16:45: error: 'PROT_READ' was not declared in this scope
buffer = (char*)mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, fd, 0);
^~~~~~~~~
main.cpp:16:56: error: 'MAP_PRIVATE' was not declared in this scope
buffer = (char*)mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, fd, 0);
^~~~~~~~~~~
main.cpp:16:70: error: 'MAP_NORESERVE' was not declared in this scope
buffer = (char*)mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, fd, 0);
^~~~~~~~~~~~~
main.cpp:16:90: error: 'mmap' was not declared in this scope
buffer = (char*)mmap(0, sb.st_size, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, fd, 0);
^
main.cpp:17:17: error: 'close' was not declared in this scope
close(fd);
^
main.cpp: In destructor 'parser::~parser()':
main.cpp:37:34: error: 'munmap' was not declared in this scope
munmap(buffer, sb.st_size);
^
main.cpp: In member function 'void heap<_elem, is_less_than>::run_diagnostic()':
main.cpp:154:13: error: 'cout' is not a member of 'std'
std::cout << storage[i] << " ";
^~~
main.cpp:155:9: error: 'cout' is not a member of 'std'
std::cout << std::endl;
^~~
main.cpp: In instantiation of 'void heap<_elem, is_less_than>::sift_up(unsigned int) [with _elem = integer; is_less_than = integer::do_compare]':
main.cpp:111:16: required from 'void heap<_elem, is_less_than>::add(_elem) [with _elem = integer; is_less_than = integer::do_compare]'
main.cpp:256:27: required from here
main.cpp:172:26: error: no match for 'operator!=' (operand types are 'integer' and 'integer')
if (storage[pos] != aux)
~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/6/iosfwd:40:0,
from /usr/include/c++/6/ios:38,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !