Top "Std" questions

The C++ Standard Library, and its namespace.

MinGW error: 'min' is not a member of 'std'

I'm trying to convert some VC++ 6 code to a console app using only the standard libraries but am getting the …

c++ max std min
Outputting 'wchar_t*' to an 'ofstream'

I want to output a text to a file via two pointers that I have declared: wchar_t *Col1="dsffsd", *…

c++ file std wchar-t wofstream
std::bind to std::function?

I get a compile error using this: std::vector<std::function<int(int)>> functions; std::function&…

c++ function c++11 bind std
Is there a better way to reverse an array of bytes in memory?

typedef unsigned char Byte; ... void ReverseBytes( void *start, int size ) { Byte *buffer = (Byte *)(start); for( int i = 0; i < size / 2; …

c++ memory swap std
std::forward_list and std::forward_list::push_back

I'd like to use std::forward_list Because: Forward list is a container which supports fast insertion and removal of …

c++ c++11 std forward-list
std::vector resize downward

The C++ standard seems to make no statement regarding side-effects on capacity by either resize(n), with n < size(), …

c++ vector resize std stdvector
Broken c++ std libraries on macOS High Sierra 10.13

I recently bought a new MacBook on which I transferred my old session. Since then, and after i upgraded to 10.13, …

c++ macos compilation std macos-high-sierra
C++ fread() into a std::string

Like always, problems with pointers. This time I am trying to read a file (opened in binary mode) and store …

c++ string casting std fread
Why is rand()%6 biased?

When reading how to use std::rand, I found this code on cppreference.com int x = 7; while(x > 6) x = 1 + …

c++ random std
Why is there no std::stou?

C++11 added some new string conversion functions: http://en.cppreference.com/w/cpp/string/basic_string/stoul It includes stoi (…

c++ string c++11 std