Questions tagged as 'c++'

3
answers

How to make case-insensitive comparisons in SQLite?

As there is an obsession with questions with accents, here's mine:) SQLite allows you to make direct comparisons or through like with any encoding / charset from byte to . It only allows comparisons to be made regardless of case...
asked by 09.01.2014 / 14:01
2
answers

Why use while (0)?

In the Linux code I saw some macros with: do { }while(0) Is there a reason? Because apparently there is no logic to a loop of repetition where the code repeats only once.     
asked by 13.08.2015 / 21:13
3
answers

What is the signature of a method?

A signature of the common method / function or constructor is made up of its name + number of parameters + type of parameters?     
asked by 10.11.2014 / 11:34
2
answers

What are rvalues, lvalues, xvalues, glvalues and prvalues?

Prior to C ++ 11, there were only two value categories for expression tree types: lvalue and rvalue . In a very simplified way, the first represents a reference that can be changed and whose address can be read, while the second is a temporar...
asked by 18.02.2014 / 19:49
3
answers

Should I free up all allocated memory at the end of a program?

It is commonly accepted that when I allocate a block of memory I am responsible for releasing it. This is particularly true when programming based on RAII. However the following program works perfectly: int main() { int* ptr = new int[9999...
asked by 16.02.2014 / 15:49
2
answers

+ 3 overloads - What would that be?

asked by 26.06.2016 / 12:04
2
answers

What is the purpose of the free () function?

In which cases should it be used? Is there an alternative? Is it recommended to use?
asked by 12.12.2014 / 12:18
4
answers

How to convert an int to two bytes in C / C ++?

I get the data from a temperature sensor on a microcontroller that has a 10-bit AD converter. I store the data in a variable of type int (of 32 bits), and I need to send this data via serial communication. For this, I need to convert this...
asked by 03.04.2014 / 19:03
2
answers

In what situations should I allocate a vector dynamically in C ++?

I'm working on a framework code for my work. In one of the functions, it dynamically allocates a std::vector , makes a copy of each node that the object has and returns it to the user: std::vector<Node> *Tree::getAllNodes() {...
asked by 14.12.2013 / 21:31
1
answer

Are there alternatives for reflection / introspection in C ++?

I have the following problem. Given any type of T : template <typename T> I need to be able to convert an object of type T to a std::unordered_map<std::string, boost::any> map containing an entry for eac...
asked by 18.08.2016 / 11:26