Questions tagged as 'c++11'

1
answer

Insert an element in a position in a C ++ 11 list

I need to insert an element within a list declared as follows: list < list <unsigned int> > bucket (16); I must insert an element into one of the bucket lists as efficiently as possible. I have the position in which I should ins...
asked by 23.10.2017 / 15:51
1
answer

Doubt pop procedure stacks c ++

this code shows in reverse order the contents of the list linked from node n with the help of a stack. One question, if instead of showing the content of the list in reverse order, I want to show it in normal order, how should I handle the stack...
asked by 25.07.2017 / 14:30
1
answer

Copy of pointers Matrix

I'm a little frustrated because I do not understand why this function puts garbage instead of the result. Could someone please tell me what I'm wrong about? I use the MinGW 5 compiler that comes in Qt. Here I put the headers ... class matri...
asked by 20.07.2017 / 02:54
2
answers

What is the difference between the container std :: map and std :: unorderedmap

What is the difference between these STL containers std :: map and std :: unorderedmap, also when looking for an element which is more efficient.     
asked by 13.01.2017 / 16:03
1
answer

Given 2 lists generate 2 new lists with the elements that are in both and with those that are only in one

Given two ordered lists L1 and L2 , write a function: void bool_opers(list<int> &Lxor, list<int> &Land, list<int> &L1, list<int> &L2); The algorithm must generate in Lxor a new sorted list wit...
asked by 05.09.2018 / 16:31
1
answer

doubt about declytype and std :: forward

I have the following piece of code, related to the topic of the forwarding references , together with the deduction of types. template<class T> void wrapper(T&& arg) { foo(forward<decltype(forward<T>(arg).get())>...
asked by 05.06.2018 / 02:02
1
answer

std :: forward and rvalue

I am reading about the use of std: forward, looking a bit at the examples that come on the internet. And the following doubt has arisen. If I define the temple: template <typename T1, typename T2> void outer(T1&& t1, T...
asked by 02.06.2018 / 00:18
1
answer

Help with Qt creator, does not allow to run projects?

I have installed the qt creator several times but it had never cost me as much as in my current pc; first I used the installer that I always had in my pendrive (the one of qt 5.8), it told me that I could not download certain repositories, I...
asked by 30.06.2017 / 05:23
2
answers

C2780 when using the STL copy algorithm

Greetings, I'm trying to design a "copy constructor", everything was fine until I came up with the copy algorithm and I have obtained a C2780 because apparently it only recognizes 2 of 3 arguments for copy ... #include<iostream> #include...
asked by 24.06.2017 / 23:57
0
answers

My bubble order does not work correctly, List doubly linked

As an activity I have to use a double linked list created by me, and likewise implement a bubble method to order the values. My Node is this: template<class T> class NodoD{ private: T dato; NodoD<T> *sig;...
asked by 14.09.2018 / 04:26