Questions tagged as 'c++'

5
answers

It is good practice to use 'return' functions or 'void' methods

Question taken to answer a comment , so that it can be better understood, and because I think it can be an interesting and useful question for other users who may wonder the same thing. Regarding the returns I know that being void function...
asked by 13.05.2017 / 22:47
4
answers

C ++ Questions about the Goto instruction

Studying programming I come across this strange instruction, in a certain way I understand that it jumps to the instruction it points to but why it is not used? The truth is a curious alternative to loops and conditional but I read that it is no...
asked by 28.02.2017 / 16:09
3
answers

Are class and typename equal in the template context?

I use: template<class T> Arbol<T>::Arbol(){ } when T is going to make a class. and use: template<typename T> Arbol<T>::Arbol(){ } when T goes to be a type for example bool , char...
asked by 06.12.2015 / 09:02
1
answer

Does it matter whether #include iostream or #include "iostream"?

Yesterday I wrote in error #include "iostream" and I did not realize because the compiler did not give an error. Later I realized and I was surprised. I've tried with this little program: // Fichero a.h #ifndef A_H #define A_H #endif...
asked by 31.12.2015 / 15:45
2
answers

Crash cycle?

I have a problem with a while cycle. I want my program to only accept 4-digit numbers, and, if the user enters one that is out of range, it will miss error. I had done this, but I noticed that from a certain number of figures, the program end...
asked by 26.02.2018 / 07:47
3
answers

Smoothing of fonts with 8-bit color per point

I am using uGui to display fonts on the screen. But the final result is not as satisfactory as it should be. The hardware is quite limited: color of 8 bpp (256 colors in total), with 3 bits for red, 3 bits for green, and 2 bits for blue (3: 3:...
asked by 10.05.2018 / 12:09
3
answers

C ++ Alternative to getch ()?

Do you know any alternative to the getch() function? because it's from the Conio library (which is not standard) and I would like to know if there is any standard alternative for C ++. I have this code: do { tecla = getch();...
asked by 21.02.2017 / 23:30
2
answers

C ++ Destroy objects in a fix

Hi, I have a couple of questions Let's say I have this code: class alumno { private: string nombres; char telefono[12]; int nivel; public: alumno(); ~alumno(); } and then in the main declar...
asked by 13.02.2017 / 18:43
2
answers

Libraries of c ++ and c

Good morning. I would like to know some concepts about the c ++ and c libraries. My first question would be why you can use stdio.h in c ++ in addition to iostream, and which is better to use in the end, besides another question would be the dif...
asked by 08.02.2017 / 01:29
2
answers

Error extracting string character UTF-8

NOTE Although it does not affect the template code ( utf8iterator.hpp ), the main.cpp depends on the encoding used when saving it to work correctly. In my system, I work with UTF-8, and said main.cpp is saved in the sa...
asked by 20.03.2017 / 11:00