Questions tagged as 'c++'

2
answers

Doubt binary search recursive unsorted vector

There is a solved recursive exercise that I do not understand:    Implement the method int rsearch (int i, int d, const T & x) of the vector_t class that performs the recursive binary search on an unordered vector, returning the position...
asked by 24.07.2017 / 15:28
2
answers

I would like to be able to return the cycle but including this code the while equation (age0)

I want to make this code when it is greater than 25 and less than zero (negative numbers) I return to the beginning of the program "write age" #include <iostream> #include <conio.h> using namespace std; main() { int edad; d...
asked by 19.11.2016 / 00:38
2
answers

How can I use std :: basic_filebuf from fstream to write to a file in c ++

I have been looking for both English and Spanish, and I do not get information that I understand about it; I try to do the following: #include "stdafx.h" #include <fstream> #include <iostream> using namespace std; int main() {...
asked by 17.04.2018 / 04:46
2
answers

How do I extract data from the end of a dynamic stack?

I'm designing a C ++ program with a dynamic stack but when I extract the data I want it to be inverted, they can help me. This is my code: #include <iostream> using namespace std; #define true 1 #define false 0 struct docentes{...
asked by 17.10.2018 / 10:38
1
answer

C ++ How do I make the visual environment of a program?

I've been programming for a while in C ++ and I'm starting to see C # I'm honestly interested in making desktop programs, but I have no idea how the visual environment of the program is made; that is: buttons, effects, images, sounds, etc....
asked by 12.02.2017 / 17:25
1
answer

c ++: Doubt with exception handling

I'm learning c ++ and I wanted to try a code using try and catch. So I wrote a program that would deliberately send an error out_of_range: #include <iostream> #include <stdexcept> class foo{ public: foo(int s) :elem{ne...
asked by 23.03.2018 / 00:24
5
answers

C / C ++ - Pointers

I have a question about the following code: int main() { int *x, *y; int i; i = 10; x = &i; y = x; *x = *y +1; cout << i << endl; *y = *x + 1; cout << i << endl; return 0; }...
asked by 06.01.2018 / 16:23
2
answers

Do without the header files?

I'm seeing if I can do without tinkering with header files in C ++ projects. Probably they were the sea of good for C in the '60s, but actually today it is difficult to justify their existence in C ++. I wrote a small program that consists of...
asked by 23.04.2018 / 05:01
2
answers

C ++, Matrices, random numbers?

I am struggling to make a subprocess that fills an array of n x n, with even random numbers, which must be between 1 and 100. As I understand it, to generate the random numbers I can use the function rand , but I do not really know what...
asked by 29.10.2016 / 06:49
1
answer

How to connect to a wifi with qt

Good afternoon, can someone help me? I need to make an application in c ++ using QT. It has to look for wireless connections and connect to a specific one. I hope you can help me     
asked by 26.10.2016 / 18:10