Questions tagged as 'c++'

1
answer

Help with this exercise c ++: impirment terms of the series [closed]

Write a program that reads an integer n> 0 and prints n terms of the series 4,12,24,40,60 ... It should also print the sum of n     
asked by 06.05.2017 / 16:47
1
answer

Connect Qt with Github?

Hello! How are you? I am currently developing software with Qt but I will start with the "Version Controls" since I will be working as a team, but I can not connect directly with Github , what I want is that yes; I am modifying an Ej file:...
asked by 26.04.2017 / 00:33
1
answer

New char in c ++ gives me long wrong

The question is why when I do char *ic( char *p ) { int largo = strlen( p ); char *retorno = new char[largo]( ) } Being the length of the char p = 4, I think long return 14     
asked by 18.04.2017 / 00:57
1
answer

Consult Data from a Data Accessed C ++

Good afternoon, I have an exercise in which at first I ask for the Name and Certificate of a Person, I store them in a vector and run the program, with other calculations that I do. The case is that in the end develop a menu with several optio...
asked by 27.04.2017 / 19:14
1
answer

Validation in C ++

Good Night, I have the following exercise in which I ask for an answer and there are two options (S / N), S or N (yes or no), the program is great however the validation that only S or No, I can not make it work. If I put any other letter that i...
asked by 09.04.2017 / 03:57
1
answer

Convert CocktailSort algorithm from Java to C ++

public class CocktailSort { public static int izquierda, derecha, ultimo; public static int arreglo[] = {10, 23, 6, 4, 223, 2, 112, 3, 6, 34}; public static void main(String[] args) { izquierda = 1; derecha = arregl...
asked by 09.04.2017 / 07:10
2
answers

Unreclaimed functions?

I have these 3 functions that I use to change the colors of my program: #include <cstdlib> void color_correcto() system ("color 4a"); } void color_error() { system ("color 4e"); } void color_original() { system ("color 4f"); } They...
asked by 07.05.2017 / 17:39
1
answer

Insert 4 letters at the beginning of the vector

I have to insert 4 letters at the beginning of the vector #include <vector> #include <list> using namespace std; int main(){ int i; char c='a'; vector <char> caracter(10); for(i=0;i<10;i++){ caracte...
asked by 06.04.2017 / 16:30
2
answers

Validation of Quantity in C ++

Buenos Dias, I have the following exercise in which I want to validate the amount "cropa" that is only between 0 and 100, and if you go over these quantities, ask me again without finding any problem with the rest of the calculations . #includ...
asked by 07.04.2017 / 16:02
1
answer

Create a matrix of matrices using c ++ pointers

Good evening. Years ago I studied C and I am currently using it but with C ++ to get into classes when it's time. Unfortunately I do not have my notes (of C) and the queries that I have put in google do not satisfy me in addition the tests that...
asked by 24.04.2017 / 23:28