Questions tagged as 'c'

1
answer

Best way to distribute a program that uses a shared library

I wrote a program that uses a library called curlpp . The program is very simple and all it does is make an HTTP request that returns a JSON (use curlpp to accomplish this request), parse this JSON (use a jsoncons for this) and print on the s...
asked by 14.07.2015 / 02:22
1
answer

Arrange search function in double-chained circular list

Is there a way to get the error? I have to search for the name of the person who is inserted in the list and the function remove this with a bug vlw hug. #include <stdio.h> #include <stdlib.h> #include <malloc.h> #include...
asked by 29.09.2015 / 06:32
1
answer

how to force a buffer to behave like a string in C?

I'm getting a buffer from the internet, I believe that to traverse this buffer and find the last character, you need to find the character '\ 0'. But there is no '\ 0' in a buffer. Can I force this buffer to behave like a string?     
asked by 24.06.2015 / 22:34
1
answer

What is the difference between the streql () and strcmp () functions of the header string.h?

Both return 1 if two strings are equal and 0 if they are different right?     
asked by 20.05.2015 / 17:23
4
answers

"Pure" structs (without pointer) and error handling in C

Stirring with data structures ( filas , pilhas , etc), I got stuck trying to create search functions for these structures. By default, functions that may contain errors return 0 or -1 when the return type is an integer.    But...
asked by 24.05.2015 / 02:35
2
answers

Repeat loop is not running

I am making a code where you have a vector (with 15 positions) with predetermined values (10 any values and 5 times the value 0), and where the user will enter a new value to go to the end of the list ( substituting 0). It seems to me that ev...
asked by 22.03.2015 / 17:59
2
answers

Problems with if and conditions

I am making a code that gets three values and sorts them from highest to lowest. As a condition, when the numbers are repeated, an error message is displayed and the program should quit. If the numbers are different, it skips this if and...
asked by 09.03.2015 / 12:55
1
answer

how to write a name using pointers

I need a program that uses heap memory to store any name. we have the number of characters in the name and then the name, for example: 32 Josefina Penacho Reis dos Santos The output should be the name, in this case: Josefina Penacho...
asked by 05.06.2015 / 00:15
1
answer

Fork does not restore variables

The idea of the code is: Give fork 3 times, that is, from the parent create three children (with count = 0, count = 1 and count = 2). The children then upon returning from the loop will see that their i == 0 and will exit the loop. When entering...
asked by 02.03.2015 / 21:58
1
answer

How can I resolve an "undefined reference"?

I'm starting now in this programmer's life and I'm trying to run a program for physics class but at the time of compiling the file I'm getting this message back ... reach.c :( .text + 0x68): undefined reference to cos' alcance.c:(.text+0x93):...
asked by 25.04.2015 / 17:00