Questions tagged as 'c++11'

2
answers

How can I install DEV C ++ in Linux, step by step?

I'm trying to install Dev C ++ on ubuntu but I have not found a way to do it, the instructions thrown by several blogs or forums are wrong.     
asked by 15.02.2018 / 22:13
1
answer

How to delete a file from a specific path in C ++

I'm working on Windows and I want to know how to delete a file with a path such as: C:\Users\Mario\Desktop\texto.txt I have tried to eliminate it in the following way remove(C:\Users\Mario\Desktop\texto.txt) But it marks me wrong Ho...
asked by 02.11.2017 / 00:40
1
answer

How does Copy-and-swap work?

I've been reviewing C ++ 11 and C ++ 14 news, and I do not understand how Copy-and-swap works As an example: class dumb_array { public: // ... friend void swap(dumb_array& first, dumb_array& second) // nothrow { // enable ADL (...
asked by 09.06.2017 / 14:28
1
answer

Problem with polymorphism and vectors in C ++

Hello, I am doing a program in C ++ with OOP and polymorphisms but I have a problem when using vectors, this is what I have of code: Person class (parent class) #pragma once #include <iostream> #include <string> using namespace...
asked by 04.10.2018 / 20:01
1
answer

Vulkan and g ++ (undefined reference to 'WinMain')

I just downloaded the Khronos graphic library (Vulkan), and I wanted to compile the examples to see how the API works. It turned out that to compile them with the "makefile" (to call it in some way) that comes prepared with the examples is neces...
asked by 25.07.2018 / 05:12
0
answers

doubt about functions that receive a rvalue reference as argument

Someone can explain to me with a short example what is marked in bold The compiler treats a named R-value reference as an L value and an unnamed R-value reference as an R value. When you write a function that accepts a reference of value R as...
asked by 27.05.2018 / 00:52
0
answers

query about the movement constructor

Let's see if you can indicate that I do not see. In my code I have a function of type, as a test function. Rational f(Rational o){ return o;} and in the main I have asinanción: Rational a(3,5); Rational c= f(a); The object...
asked by 16.05.2018 / 21:48
0
answers

doubts about calls to builders swap method

In my main I have the following instructions: message("std::swap"); std::swap(*a, *b); The strc class has the following attribute: Char * data; Then I put the constructors that use swap below. strc::strc(strc && o) {...
asked by 12.05.2018 / 01:42
0
answers

Initialize a reference to an object in the .h file

I have a problem, when executing the next initialization of a reference to an object in the file.h. In principle, the compiler does not show any kind of problem: class Book{ public: Author author2=Author("julio","[email protected]", 'm');...
asked by 06.05.2018 / 02:16
0
answers

How to compare strings in files

I would like to know how to compare strings in files to see if there is data that is being entered by keyboard. Code void agregar (){ system ("cls"); cout<<"ingrese el carnet del alumno"<<endl; cin>>car...
asked by 10.04.2018 / 04:59