Questions tagged as 'c'

0
answers

18F45K22 - external interruption

A led flashing every half a second, while the other will only be accessed when I send a low level signal to RB0 in the microcontroller, I wanted to know if something is missing, since I did exactly as they asked me and even then, only the pollin...
asked by 30.09.2016 / 03:09
1
answer

Struct defined in the .c auxiliary file (with definition of functions and structs) is not recognized in main

I'm doing a project in C, and I have 3 files: 1 .c containing the definitions of functions and structs. 1 .h containing the prototypes of these functions and structs ae1 .c that contains main. In the .c with the definitions, I define...
asked by 15.07.2016 / 17:05
1
answer

Socket response with problems on Android NDK

I'm trying to implement this library, parson , in C, but when I try to manipulate the data obtained via connection socket (SO link) , I get a null , which does not happen when I manually put json in C. The problem is in the...
asked by 20.08.2016 / 23:22
0
answers

Error in code file.exe stopped working - Language C

I'm a beginner programmer and I've been spending a lot of time programming an old-school game. I made it work with the bot playing randomly, so to create another level of difficulty, I started to create an I.A. basic way through an if and else s...
asked by 08.07.2016 / 02:30
3
answers

Problem in program executable created in c

Well, I'm currently facing a somewhat strange problem here with my program in c. I'm creating a program in c that le integers from an external text file (I use the standard library and the fscanf function) and store it in a dynamically allocated...
asked by 25.07.2016 / 17:42
1
answer

How to use pointer and vector in a single struct in C?

I can not run a program that needs functions to execute a procedure, this function receives a vector of type struct through a pointer. It does not have a compilation error, but the program crashes when it runs and does not work. How do I use all...
asked by 05.06.2016 / 02:32
1
answer

Error compiling a modularized program in c

I made a program that read strings of a file separated by - (hyphen) and saves each string in a position of a struct vector. When compiling, it generates the following error message:    array type has incomplete element type I s...
asked by 04.06.2016 / 04:57
1
answer

st_gid and I-node with different values inside the stat structure [closed]

I'm trying to build a program inside the stat function that shows the value of inode and the value of gid . Follow the code: #include <stdio.h> #include <sys/types.h #include <sys/stat.h> #include <unis...
asked by 15.05.2016 / 22:59
1
answer

Run ruby script in C

The error code when running in ruby . file.rb: #!/usr/bin/env ruby x=1 while x<10 puts "It Work!" x+=1 end main.c: #include <ruby-2.0.0/ruby.h> int main(int argc, char **argv){ ruby_init(); ruby_script("f...
asked by 15.05.2016 / 22:08
1
answer

Insert a program inside a windows.h window in C

I have this code in C using the windows.h library for creating a simple window. How to implement a program so that it appears within this window. #include <windows.h> const char g_szClassName[] = "ClassedaJanela"; LRESULT CALLBACK WndP...
asked by 21.07.2016 / 05:12