Questions tagged as 'c++'

3
answers

What are the differences between pointer and reference in c ++?

This question is a specific c ++ version of the question: # In practice, what are the differences between a pointer and a reference in C ++? I say in practice because I would not like merely descriptive and sometimes ambiguous answers, suc...
asked by 12.01.2016 / 21:04
3
answers

Vector ordering of objects

I'm making an application that sorts a vector of objects. These objects are Cartesian points, defined in the following class: class CartesianPoint { private: int x; // Coordinate X of a pin or a wire part on a cartesian plan int y; //...
asked by 22.12.2016 / 14:20
2
answers

How to convert text to number?

How do I convert a text that I know is an integer coming from externally? It would be something like ToInt() or something like that.     
asked by 20.02.2017 / 13:57
2
answers

Access to specific memory points

How do I access an exact memory address in Windows? unsigned char * mem = {??};     
asked by 22.07.2015 / 01:16
3
answers

How do I get the directional keys in C / C ++?

Is it possible to pick up the directional keys (famous little keys) from the keyboard? if so how?     
asked by 19.03.2014 / 13:07
4
answers

Why can not I free memory?

I have the following code: #include "iostream" int main(){ int* A = new int[4]; int* B = A; delete[] A; delete B; if(B == NULL) std::cout << "B = NULL" << std::endl; else std::cout <<...
asked by 01.04.2014 / 22:16
2
answers

How to separate a string into pieces?

In other languages there is split , explode or something similar that chucks string into chunks according to some separator. Is there something C ready or do I have to do on hand?     
asked by 17.03.2017 / 12:20
4
answers

Converting float to char array in C / C ++

Recently I ran a test and there was an issue that asked for a number like 123.456 to be displayed as 321.456 . I thought the best solution would be to convert this to an array of char and then create an algorithm to print pos...
asked by 03.04.2014 / 18:42
2
answers

Problems with sizeof

I am trying to return the size of the array , but it is giving error. What to do? #include <stdio.h> char *palavra[] = {"casa", "carro"}; int main(){ int i; for(i = 0;i < sizeof(palavra);i++){ //Segmentation fault aqui....
asked by 19.01.2017 / 16:02
0
answers

How to write programs that support internationalization using cmake?

I am writing a small software in C ++ and would like to be able to translate it into other languages. Looking quickly through the internet, the most accepted tool in linux environments is GNU gettext . In the official project documentat...
asked by 30.10.2017 / 13:53