N
N
Nazar Pektropupovich2020-10-17 08:39:20
C++ / C#
Nazar Pektropupovich, 2020-10-17 08:39:20

C++ compilation error: Cannot find the specified file?

I am making a program. It looks normal, I start running it through the Windows Visual Studio debugger. It gives the error "The specified file cannot be found". I'm new, what's the problem?

<code lang="cpp">
#include <iostream>
using namespace std;
int main {
  //setlocale(LC_CTYPE,"rus");
  int a, k, d, ck;
  int d = 10;
  cin >> a;
  for (k; k <= 9; k++) {
    if (a % d != 0) {
      ck = ck + 1;
      d = d * 10;
    }
    else {
      ck = k;
      k = 9;
    }
  }
  system("pause");
  return 0;
}
</code>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Ananiev, 2020-10-17
@SaNNy32

Typically, such a message can occur if the program was not compiled into an executable file due to a compilation error.

V
Vladimir Korotenko, 2020-10-17
@firedragon

The call to system passes the string to the system and waits for completion. Your operating system does not have this command. So replace with cin>>a;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question