locked
The Sytem cannot find the file specified RRS feed

  • Question

  • When i try to run this code: 

    #include <iostream>
    #include <cstring>
    using namespace std;
    
    int prefix_comun(char x[], char y[])
    {
    	int i = 0;
    	while (x[i] == y[i] and i < strlen(x) and i < strlen(y))
    		i++;
    	if (i > 0)
    		return 1;
    	return 0;
    }
    int main()
    {
    	int nr = 0;
    	char t[201], c[21],s[201],*p;
    	cin.getline(t, 201);
    	cin.getline(c, 21);
    	p = strtok(t, " ");
    	while (p)
    	{
    		if (prefix_comun(p, c) == 0)///trebuie sa elimin cuvantul p
    		{
    			strcat(s, p);///adauga la sfarsitul lui s, cuvantul p
    			strcat(s, " ");
    			nr++;
    
    		}
    		p = strtok(NULL, " ");
    	}
    	cout << s << endl;
    	cout << nr;
    
    }

    I get the error: Unable to start program "C:\Users\User\source\repos\pb1\Debug\pb1.exe"

    The system cannot find the file specified

    • Moved by CoolDadTx Tuesday, November 10, 2020 2:39 PM C++ related
    Tuesday, November 10, 2020 11:12 AM

All replies

  • Your question is related to C++. This is the C# forums, completely different language. Please post your C++ question over in the new Microsoft Q&A forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, November 10, 2020 2:39 PM