Tag: std

2176 Why is "using namespace std" considered bad practice? 2009-09-21T03:08:23.280

531 How to find out if an item is present in a std::vector? 2009-02-20T21:58:41.557

385 What's the difference between "STL" and "C++ Standard Library"? 2011-03-05T17:32:14.067

214 Can you remove elements from a std::list while iterating through it? 2009-02-27T19:08:20.567

178 Why would I ever use push_back instead of emplace_back? 2012-06-05T02:01:45.517

152 Compelling examples of custom C++ allocators? 2009-05-05T19:36:48.660

151 Replace part of a string with another string 2010-08-05T19:06:13.010

145 cout is not a member of std 2012-07-07T14:43:46.347

131 C read file line by line 2010-08-17T10:08:59.050

125 C++ printf with std::string? 2012-06-02T21:07:06.060

120 How do I reverse a C++ vector? 2012-01-16T08:44:30.263

115 Should I use std::function or a function pointer in C++? 2014-09-15T12:59:02.043

104 Why is rand()%6 biased? 2018-04-17T13:04:33.310

100 stdlib and colored output in C 2010-07-10T13:38:41.507

100 When using C headers in C++, should we use functions from std:: or the global namespace? 2015-09-16T10:26:51.287

95 Can a declaration affect the std namespace? 2018-06-17T16:31:21.833

92 Why isn't std::initializer_list a language built-in? 2013-03-04T09:58:52.143

91 Is there a range class in C++11 for use with range based for loops? 2011-08-25T05:12:46.550

90 A std::map that keep track of the order of insertion? 2009-07-08T13:45:45.877

89 What would 'std:;' do in c++? 2012-10-09T19:32:27.717

82 How do I Search/Find and Replace in a standard string? 2009-09-29T19:13:41.160

80 Are types like uint32, int32, uint64, int64 defined in any stdlib header? 2011-05-16T04:45:18.717

75 cc1plus: error: unrecognized command line option "-std=c++11" with g++ 2013-02-03T16:25:38.690

74 Why is there no std::stou? 2012-01-03T16:21:31.917

71 How to get error message when ifstream open fails 2013-06-27T07:51:37.953

70 std::lexical_cast - is there such a thing? 2011-11-09T13:01:34.150

67 How do I combine hash values in C++0x? 2010-04-07T07:28:37.890

67 Why does std::map not have a const accessor? 2012-12-16T15:25:51.700

64 how to find the intersection of two std::set in C++? 2012-11-19T05:17:39.823

62 How to iterate over a std::map full of strings in C++ 2009-06-30T23:51:54.747

62 What would be a "Hello, World!" example for "std::ref"? 2013-03-20T17:21:18.370

61 Converting std::__cxx11::string to std::string 2015-10-28T15:19:41.677

60 Append an int to a std::string 2012-05-09T12:33:52.833

60 Does `sizeof` *really* evaluate to a `std::size_t`? Can it? 2013-12-27T22:51:52.273

60 Why does unique_ptr take two template parameters when shared_ptr only takes one? 2014-01-25T19:15:06.750

59 error C2065: 'cout' : undeclared identifier 2009-12-08T17:39:14.557

58 Passing std::string by Value or Reference 2012-05-28T19:45:47.260

57 Does std::vector.clear() do delete (free memory) on each element? 2009-02-27T09:26:37.063

57 How can I use Standard Library (STL) classes in my dll interface or ABI? 2011-04-14T10:16:57.657

57 In C++ check if std::vector<string> contains a certain value 2011-06-08T10:57:24.067

55 Why am I getting string does not name a type Error? 2011-04-03T04:54:24.557

55 std::put_time implementation status in GCC? 2013-01-03T10:16:48.117

54 What can and can't I specialize in the std namespace? 2011-12-14T23:54:42.143

53 Faster way to zero memory than with memset? 2010-09-06T23:49:05.137

53 Why is there no strtoi in stdlib.h? 2011-05-30T22:58:19.433

53 What is the use of "using namespace std"? 2013-09-20T10:06:45.230

53 Fast way to write data from a std::vector to a text file 2016-09-28T17:09:07.610

52 What is the performance overhead of std::function? 2011-02-20T13:45:47.083

52 'vector' in namespace 'std' does not name a type 2013-06-01T01:39:16.070

50 How is std::string implemented? 2009-09-23T13:39:09.437

50 declaring a priority_queue in c++ with a custom comparator 2013-04-19T18:33:32.020

50 How to declare std::unique_ptr and what is the use of it? 2013-06-03T10:11:33.627

50 Why does the string returned by ctime() contain a line feed? 2013-10-23T14:06:35.913

49 What's the difference between std::advance and std::next? 2013-02-22T04:50:21.220

49 Is it good practice to use std::vector as a simple buffer? 2013-10-23T13:06:23.010

49 Make custom type "tie-able" (compatible with std::tie) 2014-10-09T11:13:24.113

48 Ambiguous overload call to abs(double) 2009-09-03T15:13:43.493

48 Obtaining list of keys and values from unordered_map 2011-12-13T03:28:43.437

47 Is there "magic" in the STL? 2010-08-26T09:27:34.507

47 do I need to close a std::fstream? 2011-01-26T08:21:06.347

47 Sorting std::map using value 2011-02-20T11:12:43.547

46 Android ndk std::to_string support 2014-03-31T23:18:02.297

45 C++ std::tuple order of destruction 2016-08-21T20:25:51.667

44 using BOOST_FOREACH with std::map 2009-04-27T21:55:43.417

42 std::string vs string in c++ 2011-03-31T11:37:16.393

41 How to convert std::chrono::time_point to calendar datetime string with fractional seconds? 2012-10-11T08:43:52.443

41 Why can't you take the address of nullptr? 2013-01-07T04:02:12.157

41 When is it necessary to use use the flag -stdlib=libstdc++? 2013-11-04T18:43:51.987

41 How to create an std::function from a move-capturing lambda expression? 2014-08-21T08:12:46.797

40 What is the fastest way to change a key of an element inside std::map 2011-04-21T11:38:43.627

40 Sorting zipped (locked) containers in C++ using boost or the STL 2012-12-12T13:34:57.713

40 Best way to append vector to vector 2013-08-09T13:09:05.170

39 Flattening iterator 2010-09-02T00:40:49.357

39 How do I erase elements from STL containers? 2013-04-15T11:03:13.680

38 std vector C++ -- deep or shallow copy 2012-07-05T16:11:33.613

38 std::shared_ptr thread safety 2013-01-23T15:09:04.067

37 What's the difference between cstdlib and stdlib.h? 2010-05-24T22:32:19.053

35 const unsigned char * to std::string 2009-04-29T20:28:18.883

35 Conversion from boost::shared_ptr to std::shared_ptr? 2011-06-13T04:45:22.307

34 Is the C++ std::set thread-safe? 2009-09-01T12:02:11.473

34 Why Can't I store references in a `std::map` in C++? 2009-10-09T11:15:02.210

34 string in namespace std does not name a type 2012-08-07T20:44:57.613

33 Why does the C++ standard algorithm "count" return a difference_type instead of size_t? 2011-09-21T18:53:25.003

33 Is specialization of std::to_string for custom types allowed by the C++ standard? 2016-04-10T17:38:54.960

32 C++ create string of text and variables 2012-04-18T22:51:26.047

32 Why is the destructor of a future returned from `std::async` blocking? 2014-05-04T10:24:31.357

31 Is std::vector or boost::vector thread safe? 2012-01-28T02:59:27.983

30 C++ Long switch statement or look up with a map? 2010-03-17T20:42:46.410

30 std::ofstream, check if file exists before writing 2010-11-30T17:11:31.497

29 Why does numeric_limits::min return a negative value for int but positive values for float/double? 2013-06-12T16:11:25.267

29 Is there a tab equivalent of std::endl within the standard library? 2014-02-27T01:08:54.933

29 Which std::sync::atomic::Ordering to use? 2015-05-22T23:08:22.537

28 Using numeric_limits::max() in constant expressions 2010-04-29T15:07:51.433

28 std::pair of references 2010-09-22T13:35:15.653

28 How can I get a list of all the Python standard library modules 2011-06-24T05:47:47.303

28 std::mem_fun vs std::mem_fn 2012-07-27T02:49:03.800

27 std::vector resize downward 2009-07-20T20:11:52.200

27 What is the difference between using a struct with two fields and a pair? 2010-02-10T10:53:24.987

27 Search a vector of objects by object attribute 2013-03-20T07:49:04.353