I need to make an algorithm that gets 3 different numbers, and if it receives repeated numbers, it informs an error message.
My program is all working properly, but when I put the line to warn of the error I try to use Or and it does n...
I know there are two ways to prevent a header file from being duplicated in C \ C ++:
#ifndef FOO_H_INCLUDED
#define FOO_H_INCLUDED
class Foo
{
// código
};
#endif
E
#pragma once
class Foo
{
// código
};
Being the first I...
Consider the following class:
struct Type {
int a, b, c;
int& ref;
Type(int m) : a(m), b(m), c(m), ref(a) { }
Type(const Type& ot) : a(ot.a), b(ot.b), c(ot.c), ref(a) { }
} obj;
Here we have that sizeof(Type)...
Hello, I'm learning how to use the features that OpenCV offers for image processing, and the following question came up:
How do I edit only a predetermined area of an image?
To make it easier for me to understand, I'm going to use the...
I'm starting to study pointers in C / C ++ and it was something that drew my attention to the robustness and range of possibilities. However, I can only access memory locations by assigning my pointer an address of an already allocated variable,...
I was fixing the whitespace problem with getline , but I got this problem where the question "Enter the employee name:" is skipped, how do I solve this?
cout<<"\n\nDigite o nome da empresa: ";
getline (cin,nom...
I need to know how to make each circle collide with the other along with what I'm going to do to follow that direction after that collision.
This is the program's main window class:
class canvas : public QWidget {
Q_OBJECT
public:
e...
Is it possible to return multiple values? For example:
umafuncao()
{
int x = 1, y = 2;
return x,y;
}
void main()
{
int a, b;
a, b = umafuncao();
}
I'm asking this question, because I built a code using this structure for a...