Questions tagged as 'c++'

2
answers

How does bit shift work in C / C ++?

I'd like to understand how bit shifting works in C / C ++ . I would also like to understand how the processor performs the calculations and how it handles all of this. I have some examples in C / C ++ : void USART_Init(unsigned int ubrr0)...
asked by 22.03.2014 / 15:08
1
answer

How does C ++ padding work?

In several responses here in StackOverflow I have noticed users commenting on padding in data structures. struct { int a; char b; float d; } What is this padding (filler) that exists between the fields of a struct...
asked by 13.02.2015 / 13:29
2
answers

Is there a way to create cross platform programs in C ++?

I'm programming C and I'm learning Java now, but I really enjoyed learning C ++ and I wanted to know if it's possible to create cross platform programs, that is, to run on any OS without having to compile the code in each OS.     
asked by 08.06.2016 / 21:39
1
answer

What is the use of "= delete" in the declaration of a C ++ constructor?

I came across a declared constructor as follows: State(const State& em) = delete; Does anyone know what = delete is at the end of the signature of the counter?     
asked by 22.03.2018 / 19:18
3
answers

What purpose of unsigned in C ++

What is the purpose of unsigned in C ++? Example: unsigned char ch2;     
asked by 30.07.2015 / 16:05
3
answers

What does the comment of 3 bars in C ++ mean?

I know that there are basically 2 types of comments, those of a line // and the multilines /* */ , but if I comment with 3 bars until the color of the comment changes, such as below Qt and Visual Studio : If the color chan...
asked by 13.12.2018 / 14:36
2
answers

Format decimal with comma and thousand with dot

How can I format a float into the Brazilian value (price) format? Example: in php number_format($float,2,',','.') separates the decimal with comma and the unit of thousand with point.     
asked by 19.03.2014 / 17:59
5
answers

How to declare a date variable in C?

I need to create an abstract type of data that represents a person, including name, date of birth and CPF, and create a variable that is a pointer to this TAD (in the main program). To a certain extent I know, but I do not know which is the r...
asked by 04.05.2016 / 18:48
1
answer

What is the meaning of the word "cout" in C / C ++?

Well, it is very common in programming languages to have keywords responsible for printing output. Some are classic like echo , print , printf and write , etc. But in% w / o% we have% w / o%. For me, this word does...
asked by 15.02.2016 / 13:35
2
answers

Is there any way to run a java (.jar) program from a C or C ++ program?

I want to know if there is a way I can write a program .jar , and write a C / C ++ program that calls the JVM to execute the .jar file. It's possible? If so, can you give me an example code or an instruction how to do this?     
asked by 25.07.2016 / 03:26