Skip to main content
5 votes
1 answer
148 views

I paste below a minimal example that writes to an std::string and also to an std::ostringstream object, 0.5GB at a time, then queries and prints their sizes at each step. When executing on Windows (64-...
Szak1's user avatar
  • 487
0 votes
1 answer
156 views

We are changing the database connection settings for our project from WIN1252 to UTF8. (FireDAC). It is a PostgreSQL database created with UTF-8 encoding. There are some text fields that we load from ...
Leo Bruno's user avatar
  • 501
2 votes
1 answer
60 views

I am puzzled by the output of the code below: std::string content = "abcdefghijklmnopqrstuvwxyz1234567890"; std::istringstream iss(content); iss.seekg(10); std::istreambuf_iterator<char&...
Chen's user avatar
  • 330
2 votes
1 answer
171 views

I'm adding some lines into a std::stringstream with stream << "content" << std::endl. Then I'm getting the content by stream.str(). If added a line with std::endl into a std::...
powerpete's user avatar
  • 3,178
4 votes
1 answer
201 views

I'm trying to use the <chrono> library to parse a POSIX date and time string, no matter what the global locale is, based on this code: #include <iostream> #include <locale> #include &...
LightGolgot's user avatar
0 votes
1 answer
75 views

Trying to sum all rows and cols (valid doubles only) of the following file by making a vec of vecs out of it and then using an istringstream to validate doubles: 18,459,45A,AG7,490,486 4A 2,65,-87,432,...
user36474's user avatar
1 vote
1 answer
90 views

I have a code #include <iostream> #include <sstream> using namespace std; int main() { stringstream ss("123 ab 4"); int a, b, c; ss >> a; ss >> b; ...
mascai's user avatar
  • 1,718
0 votes
2 answers
111 views

I am writing a Book class as a exercise from the C++ book I am reading. I want to store the last name of an Author for sorting all of the books. So lets say the author is named: "Albert Ein Stein&...
a_floating_point's user avatar
0 votes
0 answers
59 views

def selection_changed(self,event): global change_val selection = self.TCombobox1.get() get_sel_val = selection.split('=') cur_sel_val = get_sel_val[1] get_cur_val = selection....
wyzarddoc's user avatar
-1 votes
2 answers
107 views

I want to short-circuit when an I/O operation on a std::istringstream/std::ostringstream fails, to avoid unnecessarily calling the rest of any chained <</>> operators on the already failed ...
digito_evo's user avatar
  • 3,735
1 vote
1 answer
90 views

The question is the same as the title, when using the extraction operator ">>" for the string " Hello World" There are 3 leading whitespace characters, and after "...
hexman100's user avatar
1 vote
1 answer
187 views

I am using a framework that has been working for years on CentOS 7. We are migrating it to RHEL 8 and a few of the unit tests are failing. One in particular involves junk getting returned from what() ...
mybodycravesbutterygoodness's user avatar
6 votes
2 answers
199 views

I need to construct a multi-string (REG_MULTI_SZ) in C++ from a list of values represented in a std::vector<std::wstring>. This is what first came to mind but was of course incorrect: std::...
Igor Levicki's user avatar
  • 1,673
0 votes
0 answers
65 views

I am trying to read the HEX data of a .bin file to a string. At the start of the string there is a bunch of FFs and after that the actual data starts. I want to only read the data that the .bin file ...
Shmurkio's user avatar
2 votes
5 answers
936 views

I would like to overwrite the operator<< such that: double d = 3.0; mycustomstringstream << "Hello World " << d << "what a nice day."; std::cout << ...
GRamon's user avatar
  • 87

15 30 50 per page
1
2 3 4 5
80