Questions tagged as 'c'

2
answers

Problem with vector ordering [closed]

Good afternoon, I'm having a problem with a vector ordering exercise, I have already reviewed the code, it compiles, but I'm not finding the error for the order not to stay increasing, varying in certain passages. Here is the code: #include &l...
asked by 12.04.2015 / 20:17
1
answer

Multiplication of matrix in C

I have a problem with this program, I need in an array [4] [4] to find the maximum of each line and multiply by each line number, in my program it has a syntax error, because I keep the largest number and it only multiplies by the last number of...
asked by 09.08.2014 / 20:38
2
answers

Read Blocking in C

I am trying to make a server in C. After receiving the client connection the purpose is to wait for client information on the socket, for this I use the following code. /*Read Messages*/ close(fd); nread = read(fd, msg, BUFFERS...
asked by 24.03.2014 / 23:22
2
answers

Program "jumping" Variables

The program is jumping the variables without at least I put the number I want to use on it. I can only put the first and then jump and it results in zero. I do not know if and error of the Dev-C ++ program or the code. #include<stdio.h&...
asked by 21.03.2014 / 16:02
1
answer

How to do Tiles 2D collision in C ++

Hello. I would like to know how I can do to get Tiles crash in C ++. I am using an engine made by my friend, however, I would like to know how to do it. I'm using SDL 2! Thank you in advance Thiago     
asked by 23.05.2015 / 18:29
1
answer

Search for the child in log (n)

Hello. I need an efficient data structure to get the smallest value of a cluttered vector, where: The vector can not be ordered. The vector must be able to update the values in log (n). The search for the smallest value of the vector mus...
asked by 03.11.2018 / 01:29
2
answers

Change a text value through pointer in C

I need to change the values of the variables through their pointers but I can not. #include <stdio.h> #include <stdlib.h> //Programa principal int main() {//Declaração de variáveis e ponteiros int x = 0; int*p; float y = 0...
asked by 26.11.2018 / 16:43
1
answer

Tie does not perform all it should

I have a problem with my program, so I need it to randomly show an order of numbers (teams). The problem is that when I put a number greater than 10 it does not show the 10, it shows only a few: int cont1, aux, n, sorteio; char op = 's'...
asked by 26.11.2018 / 02:31
1
answer

Slow execution of a repeat problem is in c [closed]

I made this algorithm for the problem below. The same works and returns the desired value. However, it is running slowly to the size of the problem and the tool, which corrects the problems, is not accepting the same as certain. Could anyone...
asked by 10.10.2018 / 00:54
1
answer

What is the operator for in the context of virtual memory paging?

I'm seeing the virtual memory implementation and I have this code: #define INDEX_FROM_BIT(a) (a / 8*4) #define OFFSET_FROM_BIT(a)(a % (8*4)) static void set_frame(u32int frame_addr) { u32int frame = frame_addr/0x1000; u32int idx =...
asked by 15.12.2015 / 22:35