Questions tagged as 'c'

2
answers

How to declare in the function a component of a static struct? W

In the .h file: struct conectores { int entrada[n]; int busca[n]; } conect; struct connectors; void cadastra_entrada(FILE *fp, int cont, struct conectores conect, int entrada[n]); Function: void cadastra_entrada(FILE *f...
asked by 02.12.2015 / 13:36
1
answer

How to traverse a 2-D array in C and display?

In this code, I have an array of two dimensions, I started and I want to start with printf, but I do not know how to do it: #include <stdio.h> #include <stdlib.h> int main() { int i; int matriz1 [3][4] = {1, 2, 3, 4, 5, 6,...
asked by 17.05.2015 / 02:33
1
answer

How to capture hardware id

I'm trying to find a way to capture the HD serial, CPU and motherboard, the CPU I found a way that is using cpuid.h, now the motherboard and the HD I did not find way to capture power, someone Do you have any ideas?     
asked by 18.04.2015 / 04:12
1
answer

Socket in C - Connection test between client and server (Linux)

I'm working with sockets in embedded system communication. I create a thread to handle the connection, however as my system uses Wi-Fi connection I need to perform some sort of connection test before sending or receiving, in case this connection...
asked by 22.04.2015 / 23:50
1
answer

What does the error mean: realloc (): invalid pointer: 0xb78094d8?

My program, whose code is below, has the following error: I do not understand why, I have plenty of memory in my PC, and all compiler sites have the same problem. ***Errorin'./prog':realloc():invalidpointer:0xb78094d8***=======Backtrace:==...
asked by 30.10.2014 / 08:56
2
answers

What is the difference between open and opendir calls on UNIX?

If the opening of files is used the system call open, because there is another system call to open files directory (opendir), if a directory is a file type? Was not it just a call for all file types?     
asked by 31.10.2014 / 05:28
1
answer

How does the buffer work using printf and scanf?

Using printf , when I do: printf("\n\tQualquer coisa\n"); It inserts this first into a buffer and then prints to the screen (standard output)? Using scanf with the format %c , it captures the character-to-character buf...
asked by 07.11.2014 / 13:48
1
answer

MQL4 Language (BUY and SELL Orders)

Someone is aware of this "MQL4" language, it is based on C and is used particularly by a stock exchange listing program. If anyone knows, my question is this: How do I make BUY and SELL orders for Binary Options?     
asked by 03.02.2015 / 10:48
1
answer

Conversion of struct with struct nested to record

I have a small "constraint" on a project I'm working on. We received a DLL written in C so we could communicate with readers of that company.  Attached, came an example written in Borland C ++ 6, which works correctly. The problem is to use this...
asked by 01.07.2014 / 02:12
1
answer

"SIGSEGV" error when receiving a large data packet

Hello, I'm experiencing a "SIGSEGV" error when receiving a large data packet with the recv function of the library using C language on a Posix-UNIX system, if any soul can help me one thank you. buffer: char ls_buffer_PPouAUT[2048] = {0...
asked by 21.07.2016 / 14:17