Questions tagged as 'c'

1
answer

"sh: 1: Syntax error: word unexpected (expecting") ")" when using dns function

#include <stdio.h> #include <stdlib.h> #include <getopt.h> #include <unistd.h> #include <string.h> void verbose() { printf("Ói eu aqui. \n"); exit(0); }//FECHA verbose void ajuda() { printf("Ajuda? Nem a...
asked by 11.08.2016 / 01:42
1
answer

Socket C ansi header Post

Hello, I have a socket in C ansi without using additional libraries normally working with http requests. When requesting on a new server does not get any response, using the lib curl, it results 100-continue and does the process normally. How...
asked by 15.07.2016 / 17:54
0
answers

Doubt with pointers in C

Hello, I'm looking for the hrs problem in this excerpt (implementation of an avl tree) but I can not find, I pass a D for this function and its value is modified within the context, but it is not modified in the context in function is called....
asked by 04.07.2016 / 00:27
1
answer

How can I clean the buffer?

I'm working with file. I have trouble clearing the buffer I already used fflush(stdin) after reading but it does not work. void EscreverFicheiro(FILE * ptr,LISTA dados){ ptr = fopen("listagem","wb"); system("cls"); printf("...
asked by 15.08.2016 / 10:44
2
answers

Creating dynamic structures based on a text file

Is it possible to create a dynamic structure based on information stored in a text file (file)? Or is this only possible if the file is binary? For example: if I have a number (5) in a text file, can I go fetch it and store it in a dynamic st...
asked by 06.07.2016 / 01:36
1
answer

Error Segmentation fault (core dumped) in code reading and breaking strings

I need to read each line of an input file, break it into tokens and save each token in a position of a struct. I'm able to do this partially, but at a certain point in the file, segmentation fault occurs and the program does not read the file co...
asked by 26.06.2016 / 23:49
1
answer

Counting Numbers using Array in C

How to count integers using an array in C in this model: Entry > two strings with "integers" ex: 8 15 Output > A string with range numbers, inclusive: ex: 8 9 10 11 12 13 14 15. Probably a basic question, but I'm a beginner...
asked by 18.10.2016 / 15:58
0
answers

Program stack and row C

I created a program in C to remove (or copy) values from a queue using the output rules of a stack and add them to a new structure. But it is not working as I would like it to be. You are adding values with the queue rules, but I can not pull th...
asked by 04.06.2016 / 20:19
1
answer

There is no ANSI driver on windows 7, what is a replacement?

For simple formatting in C , you can use ANSI DOS driver, which had on the IBM and Windows XP micros, but windows 7 does not support the ANSI driver. Is there a substitute for such functions?     
asked by 19.05.2016 / 23:32
1
answer

Segmentation Fault when initializing Code Blocks in Fedora

Error presented:    Try to migrate conf-folder       The places where the configuration files and user-data files are   stored have been changed to be more standard-conform.       Now moving "/root/.codeblocks/share/codeblocks" to   "/root/...
asked by 16.06.2016 / 01:28