Hej!
Mam taki oto kod:
#include
#include
#include
#include
using namespace std;
int main() {
int nFragY;
int nFragX;
int nTextY;
int nTextX;
int nFind = 0;
string strFind;
string strHelp;
string strHelp2;
string strHelp3;
string strReturn;
string strReturn2;
cin >> nFragY >> nFragX >> nTextY >> nTextX;
vector aFrag(nFragY);
vector aText(nTextX);
for(int i = 0;i
cin >> strHelp;
string strHelp2(strHelp, 0,nFragX);
aFrag[i] = strHelp2;
}
cin >> nTextY;
cin >> nTextX;
for(int i2 = 0;i2
cin >> strHelp;
string strHelp2(strHelp, 0,nTextX);
cout << strHelp << endl;
aText[i2] = strHelp2;
//-------------------------------------------------------------------------------
for (int i3 = 0;i3 < nTextX;i3++) {
strFind = aFrag[0];
for (int i4 = 0;i4 < nFragX;i4++) {
if (strHelp2[i3] == strFind[i4]) {
nFind++;
if (nFind == 1) strReturn2 = "1 "+i3;
if (nFind >= nFragX) strReturn = strReturn2;
cout << strHelp2[i3] << endl << strFind[i4] << endl;
} else {
nFind = 0;
}
}
}
}
if (nFind != 0) cout << strReturn;
else cout << "NIE";
cout << endl;
system("PAUSE");
}
Interesuje mnie kod do tego komenta ---- a mianowicie skompilujcie to cudo potem wpiszcie np. 1 4 1 8 abcd abcdefghij. I CO? i się wyświetla abcd ■■■? na naprawdę nic mi już nie przychodzi do glowy dlaczego tak jest?! Sorry za wcięcia ale ten devc++ jest jakiś smiszny xD Nie wiem moze u Was jest inaczej no nie wiem
Proszę o pomoc
PS: Nie czepiajcie sie reszty kodu bo musze go jeszcze usprawnić porządnie