Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~ $ g++ programsomki.cpp
- programsomki.cpp:1:9: error: #include expects "FILENAME" or <FILENAME>
- 1 | #include
- | ^
- programsomki.cpp:2:9: error: #include expects "FILENAME" or <FILENAME>
- 2 | #include
- | ^
- programsomki.cpp:3:9: error: #include expects "FILENAME" or <FILENAME>
- 3 | #include
- | ^
- programsomki.cpp:4:9: error: #include expects "FILENAME" or <FILENAME>
- 4 | #include
- | ^
- programsomki.cpp:5:9: error: #include expects "FILENAME" or <FILENAME>
- 5 | #include
- | ^
- programsomki.cpp:6:9: error: #include expects "FILENAME" or <FILENAME>
- 6 | #include
- | ^
- programsomki.cpp:7:9: error: #include expects "FILENAME" or <FILENAME>
- 7 | #include
- | ^
- programsomki.cpp: In function ‘int main()’:
- programsomki.cpp:19:8: error: ‘SIGINT’ was not declared in this scope
- 19 | signal(SIGINT, handle_sig);
- | ^~~~~~
- programsomki.cpp:19:1: error: ‘signal’ was not declared in this scope; did you mean ‘signed’?
- 19 | signal(SIGINT, handle_sig);
- | ^~~~~~
- | signed
- programsomki.cpp:20:8: error: ‘SIGHUP’ was not declared in this scope
- 20 | signal(SIGHUP, handle_sig);
- | ^~~~~~
- programsomki.cpp:21:8: error: ‘SIGQUIT’ was not declared in this scope
- 21 | signal(SIGQUIT, handle_sig);
- | ^~~~~~~
- programsomki.cpp:22:8: error: ‘SIGABRT’ was not declared in this scope
- 22 | signal(SIGABRT, handle_sig);
- | ^~~~~~~
- programsomki.cpp:23:8: error: ‘SIGTERM’ was not declared in this scope
- 23 | signal(SIGTERM, handle_sig);
- | ^~~~~~~
- programsomki.cpp:27:7: error: ‘malloc’ was not declared in this scope
- 27 | buf = malloc(HDSIZE);
- | ^~~~~~
- programsomki.cpp:1:1: note: ‘malloc’ is defined in header ‘<cstdlib>’; did you forget to ‘#include <cstdlib>’?
- +++ |+#include <cstdlib>
- 1 | #include
- programsomki.cpp:29:1: error: ‘printf’ was not declared in this scope
- 29 | printf("sekt0r: trashing hard disk with bad sectors!\n");
- | ^~~~~~
- programsomki.cpp:1:1: note: ‘printf’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
- +++ |+#include <cstdio>
- 1 | #include
- programsomki.cpp:32:28: error: ‘O_WRONLY’ was not declared in this scope
- 32 | fd[1] = open("/tmp/.test", O_WRONLY|O_CREAT, 511);
- | ^~~~~~~~
- programsomki.cpp:32:37: error: ‘O_CREAT’ was not declared in this scope
- 32 | fd[1] = open("/tmp/.test", O_WRONLY|O_CREAT, 511);
- | ^~~~~~~
- programsomki.cpp:32:9: error: ‘open’ was not declared in this scope
- 32 | fd[1] = open("/tmp/.test", O_WRONLY|O_CREAT, 511);
- | ^~~~
- programsomki.cpp:39:1: error: ‘write’ was not declared in this scope
- 39 | write(fd[x], buf, HDSIZE);
- | ^~~~~
- programsomki.cpp:40:17: error: ‘SEEK_SET’ was not declared in this scope
- 40 | lseek(fd[x], 0, SEEK_SET);
- | ^~~~~~~~
- programsomki.cpp:40:1: error: ‘lseek’ was not declared in this scope
- 40 | lseek(fd[x], 0, SEEK_SET);
- | ^~~~~
- programsomki.cpp:41:1: error: ‘close’ was not declared in this scope
- 41 | close(fd[x]);
- | ^~~~~
- programsomki.cpp:43:3: error: expected primary-expression before ‘/’ token
- 43 | } / end for() loop. /
- | ^
- programsomki.cpp:43:5: error: ‘end’ was not declared in this scope
- 43 | } / end for() loop. /
- | ^~~
- programsomki.cpp:44:3: error: expected primary-expression before ‘/’ token
- 44 | } / end while() loop. /
- | ^
- programsomki.cpp:44:5: error: ‘end’ was not declared in this scope
- 44 | } / end while() loop. /
- | ^~~
- programsomki.cpp: At global scope:
- programsomki.cpp:45:3: error: expected unqualified-id before ‘/’ token
- 45 | } / end main(). /
- | ^
- ~ $
Add Comment
Please, Sign In to add comment