istream
Easiest way to read a null terminate string with istream?
I have an ist开发者_开发问答ream and i need to read exactly a specific amount of bytes BUT i dont know the length of it. It is null terminated. I was thinking i could either 1) Write a loop and read o[详细]
2023-02-16 10:19 分类:问答Getting an IStream from an OleVariant
I am using Delphi along with WinHTTP to do an HTTP request to download some files from the internet, and I can do the request but I don\'t know how to get the IStream from the OleVariant that is retur[详细]
2023-02-09 03:11 分类:问答Easiest way to get words of one line from istream into a vector?
istream has the >> operator, but it skips new lines like it skips whitespace. How can I get a list of all the words in 1 line only, into a vector (or anything else that\'s convenien开发者_运维技[详细]
2023-02-08 06:06 分类:问答istream's tellg/seekg cannot be protected from stack smashing (g++)?
For a program that I\'m writing, it is useful for me to calculate file sizes, which I calculate by using iostream\'s tellg and seekg functions, but this leads to a warning by -Wstack-protector. The fo[详细]
2023-02-07 18:08 分类:问答istream::getline return type
What does the istream::getline method return? I am asking because I have seen that to loop t开发者_如何学运维hrough a file, it should be done like this:[详细]
2023-02-05 12:11 分类:问答C++: ifstream::getline problem
I am reading a file like this: char string[256]; std::ifstream file( \"file.txt\" ); // open the level file.[详细]
2023-02-05 09:37 分类:问答Can `std::istream::operator>>()` accept integer radix prefixes like stdio's %i format specifier?
When using scanf() and its variants, the format specifier %i will accept data as hex (prefixed \"0x\"), octal (prefixed \"0\"), or decimal (no prefix), so for example the strings \"0x10\", \"020\", an[详细]
2023-01-31 18:03 分类:问答How to create a functor that will read next value from input stream?
Something like this : std::bind1st(std::mem_fun(&istream::get ??), cin). This does not s开发者_StackOverflow中文版eem to work for me.[详细]
2023-01-24 07:37 分类:问答.NET equivalent of Delphi IStream initialization
I have the following Delphi code: var Stream: TMemoryStream; StreamI: TStreamAdapter; OleStream: IStream;[详细]
2023-01-21 18:32 分类:问答Find the end of stream for cin & ifstream?
I\'m running myself through a C++ text book that I have as a refresher to C++ programming. One of the practice problems (without going into too much detail) wants me to define a function that can be p[详细]
2023-01-13 13:39 分类:问答