Questions tagged as 'c++'

3
answers

functions passed by parameters or callback functions

Several questions: In which cases are functions callback used? Can they be used in classes? Do they work in a similar way as in javascript ? How is a function passed by means of a parameter? At the moment of declaring the par...
asked by 23.02.2017 / 04:24
2
answers

C ++ Calculation of separate rows Matrix

This is my code: #include <iostream> using namespace std; int main() { int c, floor, colum; float rent; cout<<"\n\n\t\t\t\t< Sistema de calculo de arriendos >"<<endl<<endl<<endl; cout<&l...
asked by 21.09.2016 / 20:37
2
answers

test of program.exe stopped working

I'm new in the world of programming, I'm just starting, and it turns out that today when I run a simple program I jump "test program.exe has stopped working." I do not understand why I skipped this, it had never happened to me before and it seem...
asked by 18.08.2018 / 02:12
3
answers

How do you validate that a vector can not repeat letters in c ++?

I have been trying to make a validation that when entering letters in a vector does not allow repetitions of the letters, for example I enter the letter "a" and I re-enter it should appear to me that it has already been entered but I can not do...
asked by 25.01.2018 / 03:17
2
answers

C ++ Clean only part of the screen

This is my code: #include <iostream> using namespace std; int main () { int edad; string nombre; cout<<"Hola mundo"<<endl; cout<<"Como estan?"<<endl; cout<<"Ingresa tu edad"<<endl; cin>>edad; cou...
asked by 14.09.2016 / 22:06
2
answers

How do the #endif #if #ifdef statements work?

At the moment of creating a project in CodeBlocks, a sentence #endif always appears in the bottom. What does this mean? What function can I give to this?     
asked by 27.11.2017 / 15:57
2
answers

Warning: deprecated conversion from string constant

I have a warning that I can not remove ... it says "deprecated conversion from string constant to char *". The code where he complains is the following: class THREE_DATA_4_COMPUTE { public: THREE_DATA_4_COMPUTE(const QString &c...
asked by 21.02.2017 / 16:09
1
answer

The destructor of the class is called after instantiating object with its copy constructor

It is happening to me that when executing the copy constructor of the String class, immediately after instantiating my object, the destructor of the class is called, and it eliminates the newly created object. Why does this happen? How could he...
asked by 22.11.2016 / 14:05
5
answers

C ++ Program to invert a word

This is my code: #include <iostream> #include <cstring> using namespace std; void invertidor (char cadena[], int tamano) { int tamano2=tamano; char invertido[tamano2]; for (int x=0, y=tamano; x<tamano && y...
asked by 19.09.2016 / 18:34
3
answers

Help! Segmentation fault error with simple C ++ list

Greetings to all, I premiere on this wonderful page with a block of code that continually skips "Segmentation fault" error and I do not know why. The code must receive an integer, create a node with that integer and then insert it into the li...
asked by 21.07.2016 / 17:21