Questions tagged as 'c'

1
answer

Client http socket in c

I would like someone to explain to me the following snippet of code an http client does, mostly this expression in while(sent < strlen(get)) , the complete code is . int sent = 0; while(sent < strlen(get)) { tmpres = se...
asked by 28.01.2016 / 23:07
1
answer

How to program GUI in C? [closed]

What APIs do I get to create GUI using C? I searched and found a GTK + call, but I want to know the name of other libraries to create GUI using C in the same GTK + style as Windows. If possible, post their respective sites.     
asked by 12.08.2015 / 15:04
2
answers

Insert element into a binary search tree

I'm having difficulty adding an element to a binary search tree. The function returns 1 if the element to be inserted is already in the tree and 0 otherwise. The function return works fine but when printing the tree the new element does not app...
asked by 06.07.2015 / 18:43
1
answer

Line break when typing entries

I have a vector of structs with 10 people and I want my registration function to receive only one person at a time. At the terminal, the first person's registration is done correctly but after I get this "break" line, it jumps alone from the...
asked by 22.12.2015 / 14:55
1
answer

Checking Directory (WINDOWS)

How do I check if a directory exists using C ++ and Windows API ?     
asked by 13.05.2015 / 21:28
3
answers

data structure problem

Hello, I'm doing a simple data structure program, he has to organize some flights like for example to register airports and flights of these aeroportes, each flight line can only have one airplane going and one coming back, so I made this program...
asked by 27.05.2015 / 22:33
1
answer

comparison using c characters

Ok, the problem is only in function q31 and q311. link I left the complete code in the link above. so here's this q311 function: void q311(){ char forma; int n,jota,b,i,j; printf("Informe a figura e o tamanho: "); scanf("%c",&fo...
asked by 30.09.2015 / 18:42
1
answer

How to compile SQLite3?

I'm trying to run a short test with SQLite3. I can not run this program so simple! I have already researched solutions on the internet and none of them solved my problem. Follow the program, cmakelists and logs : main.c #include <stdi...
asked by 06.10.2015 / 15:07
1
answer

How to use different heights for IMC in C?

In my BMI calculation program (in C), you must enter the mass first and then the height (of n people). I would like to know why he is considering the masses correctly but is always using the first height to calculate. #include<stdio.h> #...
asked by 26.04.2015 / 16:54
2
answers

Algorithm in C - Prime numbers

The program has to perform a prime number check, where the user enters a number and the program finds the largest prime number prior to it. the problem with my program is that it does not verify until the end, for example, if I write 10, I shoul...
asked by 16.04.2015 / 22:48