Kod: Zaznacz cały
{
cout << "Plik wejsciowy zawiera " << dw << " dwuznakow, natomiast " << z << " znakow";
}
Kod: Zaznacz cały
Severity Code Description Project File Line Suppression State
Error C2784 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,const _Ty &)': could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &&' from 'std::string' ConsoleApplication2 e:\agatka\visual studio 2015\projects\dwuznak\consoleapplication2\consoleapplication2.cpp 173
Kod: Zaznacz cały
void szukaj(string wejscie, string wyjscie)
{
ifstream plik;
plik.open(wejscie, ios::out);
int dw, z;
int u;
string dane;
plik.seekg(0, ios::cur);
getline(plik, dane);
u = dane.length();
char** textline = new char*[];
char*taba = new char[46];
taba[0 - 22] = { 'a' - 'z', };
taba[23 - 46] = { 'A' - 'Z' };
char dwuznak[16] = { 'cz','rz','ch','sz','dz','si','ni','zi','Cz','Rz','Sz','Dz','Si','Ni','Zi' };
do
{
getline(plik, dane);
u = dane.length();
for (int n = 0; n < u; n++)
{
for (int j = 0; j < 46; j++)
{
if (*textline[n] == taba[j])
{
z++;
}
}
for (int k = 0; k < 16; k++)
{
if ((*textline[n] + *textline[n + 1]) == dwuznak[k]) { dw++; }
}
}
delete[] textline, taba, dwuznak;
}
while (!plik.eof());
plik.close();
ofstream plik;
plik.open(wyjscie, ios::in);
string wypiszwynik(const int &dw, const int &z)
{
cout << "Plik wejsciowy zawiera " << dw << " dwuznakow, natomiast " << z << " znakow";
}
wyjscie << wypiszwynik;
}
pomocy!!!!!!!