-
Fototrend

Új hozzászólás Aktív témák
-
lvb
aktív tag
nagyjából. Ha vannak bene hibák, javítsd ki.

#include <list>
#include <string>
class CMyString
{
public:
CMyString( char * aData ) { data = aData; }
std::string data;
bool operator < (const CMyString& txt1)
{
return( data < txt1.data);
}
};
...
FILE * fp;
char strv[255]; //max 255 char / line
const char src[] = ''áÁéÉíÍóÓűŰöÖ'';
const char newVal[] = ''aAeEiIoOuUoO'';
int srcLen = sizeof( src );
std::list<CMyString> lText;
if( (fp = fopen( ''aaa.txt'', ''r+t'' )) == NULL ) return; //Error
while( !feof( fp ) )
{
fgets( strv, sizeof(strv) ,fp );
strv[254] = 0; //security...
for( unsigned int i = 0; i < strlen( strv ); i++ )
{
for( int j = 0; j < srcLen; j++ )
{
if( strv == src[j] ) strv = newVal[j];
}
}
lText.push_back( CMyString(strv) );
}
fclose( fp );
if( (fp = fopen( ''aaa1.txt'', ''a+t'' )) == NULL ) return; //Error
lText.sort();
std::list<CMyString>::iterator iT = lText.begin();
while( iT != lText.end() )
{
fprintf( fp, ''%s'', iT->data.c_str() );
iT++;
}
fclose( fp );
soronként meg nincs komment, az nem járja
...
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
- Apple iPhone 14 Pro Max 256GB,Újszerű,Dobozaval,12 hónap garanciával
- Apple MacBook Air M3 15 256GB,Újszerű,Dobozaval,24 hónap garanciával
- SAPPHIRE RX 6950 XT 16GB GDDR6 NITRO+ GAMING OC - Gari 2026.05.02. -ig - Eladó!
- Magyar Core I9 Dell Precision 7560 (Core I9 11950h 32Gb 512Gb 4Gb Nvidia) laptopom eladó!
- Új bontatlan ASUS ROG Keris II Origin vezeték nélküli gamer egér Fehér
- Apple MacBook Pro 14,2 11" i5 16GB 256GB SSD szép állapot - Leírást olvasd el!
- AlzaPower LML-120 Monitor Light Bar 5W, 51cm, fekete
- AKCIÓ! Sosemhasznált! HP OmniBook 5 i3-1315U 8GB 1TB 16" FHD+ Gar.: 1 év
- 3M füldugó 50 pár (100db) eladó
- ÁRGARANCIA!Épített KomPhone Ryzen 7 5700X 16/32/64GB RAM RX 9060 XT 8GB GAMER PC termékbeszámítással
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest


