Questions tagged as 'c'

1
answer

How to bind a variable from a class in c ++ to lua script?

How do I access and set a variable from a class made in C ++ to Lua? // C++ #ifndef SCRIPTSTORAGE_H #define SCRIPTSTORAGE_H #include "HTest.h" #include <luajit/lua.hpp> #include <iostream> struct HObject { unsigned int id;...
asked by 29.03.2014 / 18:54
1
answer

Create a Game in C language with the 8051 IDE MCU

I am trying to develop a game within the microprocessor curriculum, so the game is a doll that has to dodge bombs, so I have to create the doll, the bombs and get them to play. I already have a lot of code but I think it gets stuck in a while lo...
asked by 23.12.2014 / 22:58
1
answer

Generate compilation error in C for not using a function

A problem arose in creating a mini-library to simulate Threads in a PIC. You would have to force the programmer to implement a function. I would like to know if there is any way to use the preprocessors inside functions and only call it if th...
asked by 20.07.2018 / 19:57
1
answer

How to publish my library to a linux repository?

I've developed a C library and want to make it available to other developers. I would like this library to be installed using the apt-get command, for example: sudo apt-get install minhalib and in the code the developers woul...
asked by 23.05.2018 / 05:29
1
answer

Method Call with Parameters of an Array

I've always created vector methods using: void exemplo(int vetor[], int qtd){ // Código... // ... } And I never had problems, but I'm trying the same with arrays and I get an error void exemplo(int matriz[][], int lin, int col){...
asked by 18.09.2015 / 09:57
1
answer

Convert uint16_t to int

I'm doing a project where a distance detector stores distance in a uint16_t variable, and I need to turn it into int to make the comparisons, but I can not find anywhere how to do this. How to do?     
asked by 29.11.2017 / 04:27
2
answers

Problem with gets and fgets

I'm having problems with the gets and fgets function ... Always when I use them, the program skips the input, ie the user can not type the string, but only works with scanf , but I need to use the gets or fgets. I have already used the ge...
asked by 29.11.2017 / 03:48
1
answer

Creating file Makefile

I need to write a Makefile file, I've been able to set up something by searching, but I've tried to make it better for what I need, and I'm not getting it. What I'm trying to do: 1 - Check all .c or .cpp files if they have their equivalents ....
asked by 24.06.2017 / 09:01
2
answers

How to print binary / generic trees using C?

I am suffering from the following problem: I want to print the "drawing" of a tree in the terminal. The algorithm I'm working on is based on a stack. In this stack, I insert values (string or integer) and have the following commands: add, sub...
asked by 25.05.2017 / 04:09
3
answers

Recursive fibonacci printing

I have problems with the recursive fibonacci function, in the exercise you are asked to print inside the function or even using an auxiliary recursive function, but it can not print in the main function, I tried everything for printing, however...
asked by 16.01.2017 / 19:10