Questions tagged as 'c++'

1
answer

How to rotate a set of vertices around a pivot

I have a set of vertices that I need to rotate in an angle Θ around a pivot, but when I apply the transformation the vertices are distorted. What's going on wrong? I got the answer formula from a similar question in this post Here's my code...
asked by 16.03.2017 / 18:33
1
answer

Random value in C ++

I was practicing a bit of C ++, I created that simple data-set exercise, so I came across a problem, how can I generate random values in C and C ++? Taking a look at the site ( c plus plus ) found an example using time as seed (seed), the p...
asked by 12.03.2017 / 07:15
1
answer

Pass lambda expression from the command line

I created a program to calculate the definite integral of a function, but I want to be able to execute it by the terminal. #include <iostream> #include <functional> #include <cmath> #define PI acos(-1) using namespace std;...
asked by 24.07.2016 / 03:04
1
answer

error: initializer element is not constant

I'm trying to declare this buffer on global and when compiling displays the following error    error: initializer element is not constant char *ls_buffer_PPouAUT = malloc(5120*sizeof(char)); How can I resolve it?     
asked by 22.07.2016 / 15:35
2
answers

How to use multiple languages in a single program?

I've seen that Google Chrome is done in Python, C ++ and Assembly and it came to mind, how to program using multiple languages in a SINGLE program?     
asked by 12.06.2016 / 18:48
1
answer

Knowing which child class the parent class points to

I came from java and am having a question about the C ++ polymorphism. Given these classes: class Empresa{ vector<Pessoa> pessoas; int empregados; addPessoa(Pessoa* p) } class Pessoa { ... }; class Empregado:public Pessoa{ ... } c...
asked by 22.10.2017 / 19:00
1
answer

Is it possible to make commercial applications with the Visual C ++ Cross Platform?

Visual Studio 2015 brought with it the Visual C ++ Cross Platform, which by what seems to me works in a similar way to Xamarin. Is it possible to make commercial applications with the Visual C ++ Cross Platform?     
asked by 09.10.2015 / 03:56
1
answer

Implementation of classes in the header itself

In my object-oriented studies, I saw many saying that in class creation it is necessary to create a header , containing the class, attributes, and methods, as well as another cpp file to implement the methods. But I'm finding some c...
asked by 19.09.2015 / 17:03
2
answers

Android studio has ndk support?

I will start development geared towards digital tv, and will be 50% ndk.Android studio caters well? or is it better to eclipse?     
asked by 05.06.2015 / 14:51
1
answer

How to include the same class in multiple files?

Because I can not include the same class in multiple files like this: #include "familia.h" class pessoa{ private: familia *f; }; ----- #include "pessoa." class familia{ private: pessoa *p; };     
asked by 20.04.2016 / 07:57