I'm new here and I wanted to write a C++ source code that executes the command:
sfc.exe /scannow
But it doesn't work. Windows-resource protection can't start repair service.
I'm a student and I'm in my 10th grade and I do not have computer science at school, so I wanted to ask the question here.
Here is my code excerpt:
#include<stdlib.h>
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
system("sfc.exe /scannow");
}
The compiler brings no errors. I am using the GNU/GCC compiler, Windows 10 1803 and Code::Blocks(IDE)
I hope you can understand it :)