-
Fototrend

Új hozzászólás Aktív témák
-
amargo
addikt
Az ostream-et csak friend két kezelhetet és csak const ként adhatod át, mint itt is írtad, viszont tudod template-ni

Így talán jobban megérted, nameg ha kipróbálod

struct WordCount
{
WordCount() : count(0) {};
std::string word;
int count;
friend std::ifstream& operator >> (std::ifstream& f, WordCount&
df);
friend std::ofstream& operator << (std::ofstream& f, const
WordCount& df);
};
std::ofstream& operator << (std::ofstream& f, const WordCount& df)
{
f << df.word <<
": " << df.count << std::endl;
return f;
}
std::ifstream& operator >> (std::ifstream& f, WordCount& df)
{
f >> df.word;
return f;
}
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
- 27% Corsair Dominator Titanium Rgb Ddr5 96Gb (2X48Gb) 7000Mhz Cl40 !
- iPhone 15 Plus 128GB Black 100% akkuval!
- Gamer PC-Számítógép! Csere-Beszámítás! I7 7700K / RTX 2080 / 16GB DDR4 / 480GB SSD
- iPhone 15 128GB - fekete 2 év garancia (felbontott)
- Apple iPhone 15 256GB, Kártyafüggetlen, 1 Év Garanciával
- Bomba ár! Dynabook Portege X30-F - i5-8265U I 8GB I 256SSD I 13,3" FHD I Cam I W11 I Garancia!
- Apple iPhone 12 128GB, Kártyafüggetlen, 1 Év Garanciával
- Wacom Bamboo One CTF-430 rajztábla
- Apple iPhone 15 Pro Max 256 GB White Titanium 1 év Garancia Beszámítás Házhozszállítás
- GYÖNYÖRŰ iPhone 15 Pro Max 256GB Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS3943, 100% Akkumulátor
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs



