Questions tagged as 'c++'

2
answers

Is it possible to create an application in C / C ++ for Android?

I want to create an Android application using C or C ++ language. What are the advantages and disadvantages of this?     
asked by 01.06.2017 / 19:59
2
answers

Incorrect value in subtraction of binary numbers using strings

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...
asked by 19.09.2017 / 18:28
1
answer

Batteries with sequential allocation

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...
asked by 15.09.2017 / 07:21
1
answer

Newton-Raphson Algorithm

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...
asked by 14.09.2017 / 02:57
0
answers

Improve interaction between files

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...
asked by 31.08.2017 / 00:04
1
answer

Relocate Size of my structure in C?

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) {...
asked by 16.09.2017 / 17:53
0
answers

WM_KEYDOWN event not being called

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:...
asked by 18.09.2017 / 16:46
1
answer

Problem in calling base constructor in inherited constructor in C ++

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...
asked by 10.09.2017 / 23:10
1
answer

Connection Error mysql_query

#include <mysql/mysql.h> #include <iostream> MYSQL connection; void data_insert(); int main(){ mysql_init(&connection); if(mysql_real_connect(&connection,"localhost","root","irineuvocênãosabenemeu","teste",0,NULL,0...
asked by 08.09.2017 / 19:52
1
answer

Need for pull-down resistor

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...
asked by 22.08.2017 / 20:14