fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int counter, limit, n, i; //where and what are these?
  5. char** words; //and where and what is this?
  6.  
  7. int selectlength()
  8. {
  9. int length;
  10. bool shorter(false),longer(false);
  11.  
  12. cout <<"length of word"<<endl;
  13. cin.get(length,)
  14.  
  15. limit=counter;
  16. counter=0;
  17.  
  18. for (i=0;i<limit;i++){
  19.  
  20. for (n=0;n!=length;n++){
  21. if (words[i][n]=='\0')
  22. {
  23. shorter=true;
  24. break;
  25. }
  26. }
  27.  
  28. if (words[i][length+1] != '\0')
  29. {
  30. longer=true;
  31. }
  32.  
  33. if (longer==true || shorter==true)
  34. {
  35. i--;
  36. }
  37. }
  38. return 0;
  39. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int selectlength()':
prog.cpp:13:17: error: expected primary-expression before ')' token
prog.cpp:15:2: error: expected ';' before 'limit'
stdout
Standard output is empty