This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I use this to split string by a delimiter. The first puts the results in a pre-constructed vector, the second returns a new vector. | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <iterator> | |
template<typename Out> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <string> | |
int main() | |
{ | |
std::ifstream file("Read.txt"); | |
std::string str; | |
while (std::getline(file, str)) | |
{ | |
// Process str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// string::length | |
#include <iostream> | |
#include <string> | |
int main () | |
{ | |
std::string str ("Test string"); | |
std::cout << "The size of str is " << str.length() << " bytes.\n"; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Zsírbólé | |
Hozzávalók hét főre: | |
- 3 és fél liter forró kolbászzsír | |
- negyed kiló fagyasztott disznózsír | |
- 1 kocka margarin | |
- 30 dkg reszelt töpörtyű (kéziárazás) | |
- 35 dkg zsírszalonna | |
- 0.2 dl étolaj (lehetőleg light, hogy egészséges legyen az italunk) | |
- 1 csokor petrezselyem |