Top "C++" questions

C++ is a general-purpose programming language.

Easiest way to convert int to string in C++

What is the easiest way to convert from int to equivalent string in C++. I am aware of two methods. …

c++ string int type-conversion
The Definitive C++ Book Guide and List

This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. …

c++ c++-faq
How do I iterate over the words of a string?

I'm trying to iterate over the words of a string. The string can be assumed to be composed of words …

c++ string split
Convert char to int in C and C++

How do I convert a char to an int in C and C++?

c++ c gcc
Why is processing a sorted array faster than processing an unsorted array?

Here is a piece of C++ code that shows some very peculiar behavior. For some strange reason, sorting the data …

java c++ performance optimization branch-prediction
How do I find the length of an array?

Is there a way to find how many values an array has? Detecting whether or not I've reached the end …

c++ arrays
Read file line by line using ifstream in C++

The contents of file.txt are: 5 3 6 4 7 1 10 5 11 6 12 3 12 4 Where 5 3 is a coordinate pair. How do I process this data line by line …

c++ file-io ofstream
How can I convert a std::string to int?

Just have a quick question. I've looked around the internet quite a bit and I've found a few solutions but …

c++ string int
Sleep for milliseconds

I know the POSIX sleep(x) function makes the program sleep for x seconds. Is there a function to make …

c++ linux sleep
Parse (split) a string in C++ using string delimiter (standard C++)

I am parsing a string in C++ using the following: using namespace std; string parsed,input="text to be parsed"; …

c++ parsing split token tokenize