I made this code and it basically gets two numbers in binaries (without separating spaces between bits), and performs (at least in the values in which I tested) the subtraction correctly. I tried to warn myself if one of the numbers is smaller t...
I'm having trouble implementing the code in a stack using vectors:
typedef struct pilha pilha;
struct pilha
{
int *v;
int topo;
int tam_max;
};
void Inicializar_Pilha (pilha pi, int tam_max)
{
pi.v=new int [tam_max];
p...
Consider Newton-Raphson's algorithm to calculate the roots of the equation f (x) = 0
with (0.5, 1, 2, 3.4556) for each initial x.
f (X) = X ^ 4-12X ^ 3 + 47x ^ 2-60X
I made the code equal to the algorithm, but it is not finding the roots, can...
I'm creating a programming language in C ++, and I plan to make some system to work with multiple files.
In the simple compilation process, the interpreter creates .cpp and .h files and then compiles them together into one execu...
typedef struct tempNo {
int valor;
int coluna;
struct tempNo* prox;
} NO;
typedef NO* PONT;
typedef struct {
PONT* A;
int linhas;
int colunas;
} MATRIZ;
void inicializaMatriz(MATRIZ* m, int linnha, int coluna) {...
I'm developing a simple program in C ++ just for testing with a GUI but it is not calling the WM_KEYDOWN event, the program is based on dialog. The graphical interface was created through ResEdit. Could someone tell me why? Below his main code:...
I'm getting data structures in college in C ++ and this language is pretty crazy.
I'm trying to call the constructor of the parent class in the heiress class constructor, but the following error appears:
error: no matching function for...
I am using the attachInterrupt() function in Arduino Uno to recognize the end of stroke of an actuator. Usually the test is used with if() , however the actuator cycle is very fast and the recognition by this means becomes complic...