How is Multithread Orientado a Objetos implemented in C++11 ? in java this is possible through the% Class extension Thread / Implementing the Runnable interface and overriding the Run method of both. In C++11 I...
Follow the code with my suspicions:
Header:
class Name_pairs
{
public:
void read_names();
void read_ages();
void print() const;
void sort(); // Ordenar os nomes com as idades
private:
std::vector<std::s...
I have a question regarding the handling of exceptions in C ++, the class Fracao below is purposely incomplete does not even have setters or getters and several things were " left "side, has only two attributes and a constructor, and...
The funny thing is that this was an answer!
The problem I have is this: I have a Person class, which is initialized with a string, and it splits into a number and another string. After the class is mounted, I get an entire file and split it into...
#include <iostream>
#include <vector>
using namespace std;
struct dados {
int pessoas;
int consumo;
};
int main()
{
int totalx=0, totaly=0;
int n,x,y;
vector<dados> info;
//int cidade = 1;
cout...
I did a basic function of squaring (exercise of a book), and I use a variable named aux and use it to compute the square power value, but the compiler claims that aux does not is initialized, I would like to understand why and how...
Errors occur when I pass the object of class Name_pairs by output operator << and comparator == .
Header:
class Name_pairs
{
public:
void read_names();
void read_ages();
void pr...
I'm trying to simulate a mouse click using the X11 library on linux.
Using the xev command on the terminal I have the following outputs.
For a real click:
ButtonPress event, serial 32, synthetic NO, window 0x2c00001,
root 0xdb, subw...