Questions tagged as 'c'

3
answers

How to embed a library inside the other?

I've created a library for developing games in C ++. Except that my library needs another one to make the images display on the screen, the SDL2. So every time someone wants to use my library, the person would have to link to mine and SDL2. Ex:...
asked by 29.12.2017 / 17:40
1
answer

How to connect a bit to a number?

There are situations where we use numbers to load flags , meaning each bit, or set of bits, means something. Or we need to manipulate some data according to their bits, maybe it has to do with colors or something that bits individually end up h...
asked by 05.01.2017 / 11:54
1
answer

Difference between GCC CLang

Unix-based systems (a large majority) usually use GCC , to compile the files in C , but also have the CLang for the same purpose.    Is there a difference in compiling a project using GCC and CLang ?     
asked by 26.07.2016 / 03:23
1
answer

Hamiltonian cycle taking too long

I have to find out if there is a Hamiltonian cycle in a giant graph (1000 vertices in the lowest instance and 5000 vertices in the largest). My initial idea was to do backtracking, and in small instances, it worked fine. But for instance of 1...
asked by 29.07.2016 / 20:53
1
answer

Socket Multi Thread Server - Java Server and Client in C ++

I have to develop a Mini Socket Multi Thread Server (college work) in Java and I need to make a Client in C, for example, it can be in any language, but I chose those two. How do I send the values from the Client to the Server? For example...
asked by 15.05.2015 / 20:29
2
answers

Why are you giving segmentation fault in my Assembly inline?

I'm trying to call the execve("bin/sh"...) function using assembly, however in the statement: mov %rsi,0x8(%rsi) I get a segmentation error. This is the 64bit version of the article code "smash the stack for fun and profit". voi...
asked by 08.04.2014 / 04:19
1
answer

Insert ordering and Recursive insertion

I would like to change the function to a recursive function, I'm wrong I tried it as well 1 se n > 1 então 2 Inserção-Rec (A, n−1) 3 x ← A[n] 4 i ← n−1 5 enquanto i > 0 e A[i] > x faça 6 A[i+1] ← A[i] 7 i ← i−1 8...
asked by 25.11.2015 / 06:50
3
answers

How to identify regions of heat in thermal images?

I'm developing a project where I need to process photos taken from a thermal camera. The idea is to try to identify fires in these images. I would like to know what techniques I can use for this purpose, if they know anything, or something that...
asked by 08.03.2014 / 18:32
3
answers

Recursion to return numbers from 0 to n

I'm trying to do a recursive function that returns the n numbers from 0 to n , my code looks like this: #include <stdio.h> int imprimenumeros(int n){ if (n==1) return 1; else return imprime...
asked by 28.10.2014 / 23:04
2
answers

How to convert text to number?

How do I convert a text that I know is an integer coming from externally? It would be something like ToInt() or something like that.     
asked by 20.02.2017 / 13:57