Questions tagged as 'c++'

2
answers

in the loop my gets_s is skipped in the second iteration

I am asking for the note and the names of 10 students but when it enters the second iteration of the for the gets_s it is skipped, do not let me enter the student's name. #include <string.h> #include <conio.h> #include <stdio.h&...
asked by 14.10.2018 / 21:27
1
answer

Read date of a file

I want to read a date from a file in the following way: for example void Store::leerUsuarios(const string &nombreFichero){ ifstream fichero; fichero.open(nombreFichero); if (fichero.is_open()) { string nom, mail; int dia; int...
asked by 30.09.2018 / 23:11
2
answers

Fuel Consumption C ++

I do not understand why when I answer the question of the percentage the program advances me, on the other hand if I answer but without the% I simply get a suitable answer, it will be wrong maybe the formula? Thanks in advance! #include <io...
asked by 29.10.2018 / 23:19
1
answer

doubt about dereference of iterators, c ++

In my program I have created a linked list and I want to go through it with an iterator and in a position x modify a value in the list. I've been searching the internet and I've seen several examples but none of them work for me, I think there's...
asked by 04.10.2018 / 15:47
1
answer

Why do I get an error when I want to compare a char variable with a character?

Hi, I did a function in C ++ where you must enter characters that are inserted in a set passed by parameter until "*" is entered. But I get an error when comparing the while (comparison between pointer and integer ( int and cons...
asked by 23.10.2018 / 21:09
3
answers

display the index number of a vector

I want to show the index number in which certain information is positioned in a vector. I made a for to calculate which is the person who has the least amount of children and how many are. Once I get the least amount of children, I want to say w...
asked by 18.08.2016 / 03:56
1
answer

No matching function for call to 'Class :: Class ()' [closed]

It marks me the error when wanting to reserve memory for 'n' movies //Main.cpp introducir el código aquí #include <iostream> #include"Pelicula.h" #include"Ficha.h" #include"Cine.h" #include<string.h> #include<cstdlib> using...
asked by 29.06.2016 / 07:03
1
answer

How to know if there are numbers followed vertically and horizontally in a recursive c ++ matrix?

I have the following matrix: 1 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 1 1 0 1 1 The 1 's represent the "islands" (numbers followed vertically and horizontally), which refers to being together. How can I know which numbers ar...
asked by 03.07.2018 / 06:42
2
answers

SOCKS issues

Hi, I have a few questions about SOCKS. I need to know first its utility and a brief explanation that defines exactly what they are, they are proxies that are used for anonymity, I do not know if it is the best definition. On the other hand, I n...
asked by 08.10.2016 / 20:34
3
answers

Split a string

I have this string: https://insights.ubuntu.com/feed/">Canonical How can I get, using a function, only: https://insights.ubuntu.com/feed/ until the last slash (deleting ">Canonical )?     
asked by 17.01.2017 / 04:16