Tag: c++

22252 Why is it faster to process a sorted array than an unsorted array? 2012-06-27T13:51:36.160

7974 What is the "-->" operator in C++? 2009-10-29T06:57:45.903

4251 The Definitive C++ Book Guide and List 2008-12-23T05:23:56.063

2759 What are the differences between a pointer variable and a reference variable in C++? 2008-09-11T20:03:57.173

2714 How do I iterate over the words of a string? 2008-10-25T08:58:21.013

2470 What does the explicit keyword mean? 2008-09-23T13:58:45.630

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

2154 How do you set, clear, and toggle a single bit? 2008-09-07T00:42:17.500

2137 When should static_cast, dynamic_cast, const_cast and reinterpret_cast be used? 2008-12-01T20:11:07.237

2051 Why are elementwise additions much faster in separate loops than in a combined loop? 2011-12-17T20:40:52.030

1910 What is the difference between #include <filename> and #include "filename"? 2008-08-22T01:40:06.993

1910 What are the basic rules and idioms for operator overloading? 2010-12-12T12:44:56.063

1904 What is The Rule of Three? 2010-11-13T13:27:09.260

1734 What is the copy-and-swap idiom? 2010-07-19T08:42:09.907

1626 C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming? 2011-06-11T23:30:14.617

1594 Cycles in family tree software 2011-05-28T18:39:28.277

1563 Why is reading lines from stdin much slower in C++ than Python? 2012-02-21T02:17:50.463

1556 How can I profile C++ code running on Linux? 2008-12-17T20:29:24.277

1530 Regular cast vs. static_cast vs. dynamic_cast 2008-08-26T13:20:55.357

1516 What is a smart pointer and when should I use one? 2008-09-20T00:09:24.963

1459 Why can templates only be implemented in the header file? 2009-01-30T10:06:50.997

1450 What are move semantics? 2010-06-23T22:46:46.900

1444 Image Processing: Algorithm Improvement for 'Coca-Cola Can' Recognition 2012-04-16T04:23:16.380

1415 Is < faster than <=? 2012-08-27T02:10:12.910

1392 Why does changing 0.1f to 0 slow down performance by 10x? 2012-02-16T15:58:39.667

1388 Why should I use a pointer rather than the object itself? 2014-03-03T11:54:16.520

1319 Compiling an application for use in highly radioactive environments 2016-04-24T19:09:40.713

1294 What is the effect of extern "C" in C++? 2009-06-25T02:10:07.837

1279 Easiest way to convert int to string in C++ 2011-04-08T04:19:41.567

1274 When to use virtual destructors? 2009-01-20T12:58:21.280

1260 What is an undefined reference/unresolved external symbol error and how do I fix it? 2012-09-24T22:27:40.680

1259 What is a lambda expression in C++11? 2011-10-02T14:58:12.723

1221 Replacing a 32-bit loop counter with 64-bit introduces crazy performance deviations 2014-08-01T10:33:29.093

1161 What are rvalues, lvalues, xvalues, glvalues, and prvalues? 2010-08-30T15:02:41.630

1070 What is the difference between const int*, const int * const, and int const *? 2009-07-17T13:28:09.233

1030 Why do we need virtual functions in C++? 2010-03-06T07:10:35.910

945 Where and why do I have to put the "template" and "typename" keywords? 2009-03-04T11:56:16.583

921 Undefined behavior and sequence points 2010-11-14T05:37:46.333

914 Do the parentheses after the type name make a difference with new? 2009-03-06T19:39:12.697

903 Can a local variable's memory be accessed outside its scope? 2011-06-22T14:05:48.240

881 What are the new features in C++17? 2016-06-27T18:06:32.597

858 Difference between private, public, and protected inheritance 2009-05-13T20:47:07.410

826 What are the rules about using an underscore in a C++ identifier? 2008-10-23T07:02:06.347

825 Why can't variables be declared in a switch statement? 2008-09-18T13:11:55.467

804 What are POD types in C++? 2008-09-28T18:36:09.563

798 How to convert a std::string to const char* or char*? 2008-12-07T19:30:56.800

786 Can I call a constructor from another constructor (do constructor chaining) in C++? 2008-11-21T09:43:08.520

773 When should you use a class vs a struct in C++? 2008-09-10T16:29:54.217

773 Why should C++ programmers minimize use of 'new'? 2011-06-28T00:08:14.313

753 C++ code for testing the Collatz conjecture faster than hand-written assembly - why? 2016-11-01T06:12:06.097

745 How do you declare an interface in C++? 2008-11-25T16:48:47.303

737 What are C++ functors and their uses? 2008-12-10T17:47:21.077

719 What is the difference between 'typedef' and 'using' in C++11? 2012-05-25T02:39:51.960

717 Difference between 'struct' and 'typedef struct' in C++? 2009-03-04T20:41:12.047

708 What is the difference between g++ and gcc? 2008-10-05T20:25:13.563

708 Why is my program slow when looping over exactly 8192 elements? 2012-09-04T13:51:31.017

683 Why use apparently meaningless do-while and if-else statements in macros? 2008-09-30T17:36:24.213

674 What's the best way to trim std::string? 2008-10-19T19:23:07.320

657 std::wstring VS std::string 2008-12-31T04:08:14.133

644 How to convert std::string to lower case? 2008-11-24T11:49:59.793

644 What does the C++ standard state the size of int, long type to be? 2009-02-26T07:59:23.367

643 What does T&& (double ampersand) mean in C++11? 2011-03-30T03:29:58.000

638 What is a "cache-friendly" code? 2013-05-22T18:37:01.940

631 What is object slicing? 2008-11-08T11:10:13.897

616 Meaning of 'const' last in a function declaration of a class? 2009-04-15T13:27:37.357

612 Can code that is valid in both C and C++ produce different behavior when compiled in each language? 2012-10-14T23:54:26.223

587 What should main() return in C and C++? 2008-10-15T12:13:48.327

585 What are the rules for calling the superclass constructor? 2008-09-23T13:09:20.570

585 C++ Singleton design pattern 2009-06-17T16:02:22.563

581 How to concatenate a std::string and an int? 2008-10-10T15:05:05.473

579 Why isn't sizeof for a struct equal to the sum of sizeof of each member? 2008-09-23T04:24:47.820

567 How do I achieve the theoretical maximum of 4 FLOPs per cycle? 2011-12-05T17:54:56.207

563 push_back vs emplace_back 2010-11-29T12:04:09.360

561 Why use static_cast<int>(x) instead of (int)x? 2008-09-19T16:33:58.100

538 When can I use a forward declaration? 2009-02-16T15:31:06.277

537 How to detect integer overflow? 2008-10-13T22:53:21.407

536 Use 'class' or 'typename' for template parameters? 2008-10-17T17:43:59.173

535 What is the easiest way to initialize a std::vector with hardcoded elements? 2010-02-10T10:55:33.717

532 Appending a vector to a vector 2010-03-31T09:33:02.303

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

528 Are the days of passing const std::string & as a parameter over? 2012-04-19T15:20:57.927

517 Concatenating two std::vectors 2008-10-14T15:46:01.893

512 Read whole ASCII file into C++ std::string 2010-04-08T17:19:49.340

508 Why is iostream::eof inside a loop condition considered wrong? 2011-04-09T12:49:36.447

505 How to automatically generate a stacktrace when my program crashes 2008-09-16T20:58:35.487

504 What exactly is nullptr? 2009-08-15T16:47:32.060

503 How to determine CPU and memory consumption from inside a process? 2008-09-15T14:04:43.727

494 Read file line by line using ifstream in C++ 2011-10-23T20:24:31.450

488 Sleep for milliseconds 2010-11-15T12:49:51.513

484 How to call a parent class function from derived class function? 2008-12-10T19:35:45.430

480 Difference between static and shared libraries? 2010-04-15T22:08:01.347

477 Does the 'mutable' keyword have any purpose other than allowing the variable to be modified by a const function? 2008-09-19T19:58:05.613

471 Why does C++ compilation take so long? 2008-11-25T18:25:14.347

471 Why is this program erroneously rejected by three C++ compilers? 2011-04-01T00:50:02.503

468 How can I get the list of files in a directory using C or C++? 2009-03-04T19:35:58.303

466 What is a segmentation fault? 2010-02-27T09:23:14.947

463 What is std::move(), and when should it be used? 2010-08-05T09:42:46.203

462 Which is faster: Stack allocation or Heap allocation 2008-10-02T06:06:28.067

462 C++: "std::endl" vs "\n" 2008-10-17T21:25:17.107