Combine Files fstream is fast and is good for combining large files together without needing to read in each file. Combine 2 files (can be any file type): #include <fstream> std::ifstream ifstream1("a.bin", std::ios_base::binary); std::ifstream ifstream2("b.bin", std::ios_base::binary); std::ofstream ofstream1("c.bin", std::ios_base::binary); ofstream1 << ifstream1.rdbuf() << ifstream2.rdbuf(); Adding some bytes to the output file: BYTE MyByteArray[3]; MyByteArray[0] = 0x01; MyByteArray[0] = […]
Category: stringstream
Examples(2)
.stringstream General
stringstream is a handy class that operates on strings. You can think it a file loaded into something resembling a string, or alternatively as a sort of string that you can write to and read from like a file. It’s not exactly either of those things, but its a simplified explanation. An example of a stringstream Using […]
Using Strings-Values
Using the stringstream class Add variable to string This is a nice easy way to add values to strings and just create strings easily. Get variable from string Converting double to string with a fixed number of decimal places Modifiers “hex” Make values hexadecimal. Persistent. Reset back to normal by using “dec”. uppercase Make values beign […]