Questions tagged as 'c++'

1
answer

Allegro 5 C / C ++: Problem with colors

I'm using allegro 5, and I read that to create colors just use al_map_rgb or al_color_html , so I made a map to easily access multiple colors: #include "allegro5\allegro.h" #include "allegro5\allegro_color.h" int main() { al_...
asked by 15.06.2017 / 00:05
2
answers

C ++ Visual Studio

Hello, I am a beginner in Visual Studio. I have recently installed and I am trying out C ++ programs starting with simple programs, but the same program that ran perfectly in Geany appears with several errors in VS2015. Example (I got some co...
asked by 18.05.2017 / 03:59
1
answer

Defines an overloaded + operator C ++

I could not solve the following question: Fill in the blanks to define an overloaded + operator for the "Test" class. Test Test::______(Test obj){ ___newObj; newObj.mem= mem__obj.mem; return newObj; } I do not know how to fill in the sp...
asked by 17.05.2017 / 20:12
1
answer

Copying strings in C [duplicate]

I'd like some help on the following question: I have a char with a text of 32 characters, so I would like to know how to separate this char into two of 16 characters. Type: char textao[32] = "Oi meu nome e Cesar tudo bem...
asked by 25.05.2017 / 02:30
0
answers

How to detect the collision with the floor SDL2

I'm developing a learning game using C ++ with SDL2, and I want to check when my character touches the floor. For this I created the class "Collider", with the following function (adapted): bool isCollinding (SDL_Rect a, SDL_Rect b) { if(a.x...
asked by 02.06.2017 / 03:49
1
answer

Double-chained Lists Removal Doubt (C / Orderly Insertion)

In a C ++ class the teacher had proposed an activity where I had to do a program in the form of a double-chained list with ordered insertion. However, I have a problem in the Removal part. When removing all members from either end to the other...
asked by 12.05.2017 / 23:24
1
answer

I can not make a vector point correctly to function that it belongs to

I have tried several times, but the compiler does not understand the references made in the header of the void CalculaValorparaPagar(float ValorPago[MAX], float Quant_Kwh[MAX],float Preco[MAX], int bandeira[MAX], int tipo[MAX]) function a...
asked by 14.05.2017 / 22:29
1
answer

Multiplication of C ++ arrays

I have a C ++ program that allows me to multiply 2 arrays, my problem is that I did not want to have to predefine the size of each array, so I used the following code: int ia, ib, ja, jb, ic, jc; float matriz_A[ia] [ja], matriz_B[ib][j...
asked by 10.05.2017 / 14:51
1
answer

C ++ Time Management System

I have to develop a time management system for the Data Structure chair in college, but I'm hitting myself to make it work. What is requested is the following: "Develop a time management system. This system should store the description and th...
asked by 08.05.2017 / 16:09
1
answer

Meaning of this syntax

I need to continue a job that is partially ready. However I did not find on the internet files that described or taught this in an understandable way. What is the meaning of this syntax?  Ide: NetBeans and C ++ language void Grafo::buscarElosE...
asked by 29.04.2017 / 03:31