fork download
  1. #ifndef FUNCTION05_HEADER
  2. #define FUNCTION05_HEADER
  3.  
  4. #include <stdio.h>
  5.  
  6. void selection_sort(int array[], int size);
  7.  
  8. int main() {
  9. int array[100000], size;
  10. scanf("%d", &size);
  11. for (int i = 0; i < size; i++) {
  12. scanf("%d", &array[i]);
  13. }
  14. selection_sort(array, size);
  15. for (int i = 0; i < size; i++) {
  16. printf("%d%c", array[i], " \n"[i+1==size]);
  17. }
  18. return 0;
  19. }
  20.  
  21. #endif // FUNCTION05_HEADER
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &size);
     ~~~~~^~~~~~~~~~~~~
prog.cpp:12:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d", &array[i]);
         ~~~~~^~~~~~~~~~~~~~~~~
/usr/bin/ld: /home/Z4tIAR/ccm9vQBI.o: in function `main':
prog.cpp:(.text.startup+0x70): undefined reference to `selection_sort(int*, int)'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty