Questions tagged as 'c++'

3
answers

How to use the vector class of C ++?

Needs the library #include<vector.h> To create it vector <int> c; Question: How do I store values in it and read them?     
asked by 15.03.2016 / 18:32
2
answers

Show hexadecimal value in cmd.exe

I'm trying to show the accented letter 'is' in cmd.exe through hexadecimal, but printf() only shows the value of the character itself. I'm trying the following: unsigned char eh = 0x82; printf("%x", eh)     
asked by 28.03.2014 / 02:50
4
answers

How can I decrease the processing time of the program?

I need to display this output: 1 2 3 PUM 5 6 7 PUM 9 10 11 PUM 13 14 15 PUM 17 18 19 PUM 21 22 23 PUM 25 26 27 PUM #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> int main(){ unsig...
asked by 03.07.2016 / 01:02
1
answer

What does the "" operator do in the middle of an arithmetic expression in C ++?

I found this line of code in a proposed solution to a certain problem. excedente = a % 10 + b % 10 + excedente > 9; My question is, what is the role of > 9 in this specific line?     
asked by 24.11.2018 / 21:26
1
answer

How to use the mod in C \ C ++?

How do I use the MOD function in C \ C ++? (N MOD 2) = 0 I have to use this line of my code.     
asked by 03.04.2014 / 18:51
3
answers

Changing the size of the vector in a structure

I have the following structure: struct Implicantes{ int posicao; char binario[5]; bool dontcare; bool tick; struct Implicantes *Next; }; Is it possible to change the size of the vector of char "binary" from 5 to t...
asked by 24.07.2016 / 20:44
2
answers

Use of conditions in arrays

I need to make a program that reads a 4X4 matrix and then sums the values in each row and then each column. I'm not sure how to define my condition. #include <stdio.h> int main() { int valores[4][4]; int i,j, somacol, somalin; for(i=0;...
asked by 27.09.2015 / 03:52
2
answers

Operator operation new

I wanted to understand basically what logic behind the objects of the classes that use the new operator for example, I have the following program in D language: import std.stdio; class Hello { public this(){} //construtor public voi...
asked by 15.09.2017 / 06:52
1
answer

Command to exit the scope of a function (equivalent to 'break')

How can I create an algorithm in C++ (using Qt ) to abort processing of the following codes? I have to validate many different entries and I do not want to be creating if else if else . It gets ugly fro...
asked by 17.03.2014 / 17:59
2
answers

How to open an image in C ++ using SFML?

I'm still at the beginning and need to open an image in C ++ using SFML, at the moment I'm using a code that uses the image address, but all this via code and what I need is that the address where the image is be informed by the user. Example...
asked by 06.05.2014 / 23:33