Questions tagged as 'c'

2
answers

How to return to the menu after executing function?

I would like to know how to do it after adding it () to the menu. Does anyone help? #include <stdio.h> #include <stdlib.h> char descricao[40]; void adicionar(){ FILE * pFile; printf("ESCREVA: ");...
asked by 14.05.2016 / 23:59
1
answer

How do I add or remove a vector element?

From a vector, how do I remove or add an element?     
asked by 17.05.2016 / 12:45
1
answer

Help with Text Editor in C

I'm having some problems with doing a text editor there are some of them: 1 - I do not know how to delete a line; 2 - I can not move with the mouse arrows up and edit a line of text and save in sequence; 3 - Put options like ctrl+s...
asked by 04.02.2016 / 16:24
1
answer

http server in c

Gelera would like to understand this line of code: full code: link if (strncmp(request, "GET ", 4) == 0) { ptr = request + 4; } Why add + 4?     
asked by 03.02.2016 / 21:17
1
answer

Problem in the list

The list should insert the fields of struct paths and then print them. But when I ask to print, only the first insertion appears. #include <stdio.h> #include <stdlib.h> #include <locale.h> #include <string.h> typedef s...
asked by 03.03.2017 / 19:22
2
answers

Repeat loop is in C

I have to do the following exercise: Read 3 integer values and sort them in ascending order. At the end, show the values in ascending order, a blank line and then the values in the sequence as read. The part of sorting the numbers I got....
asked by 12.04.2016 / 07:48
1
answer

How to put a color in ONLY a variable in C?

How can I put a color in JUST a variable from my code in C? I was able to change all colors of ALL of all letters with system("color 02"); with the #include <conio.h> library. But how do I have multiple colors on the sa...
asked by 26.06.2017 / 17:58
1
answer

Bootloader - programming

I have seen this code as a bootloader: link And I can not understand that part: MBOOT_PAGE_ALIGN equ 1<<0 MBOOT_MEM_INFO equ 1<<1 Well I wanted to know what this equ1<<0 , equ 1<<1 m...
asked by 01.09.2015 / 03:19
1
answer

Dynamic List with void pointer insert at start

t_lista* Cria_Lista(int (*ptrFncEscreve)(void *ptrElemento)) { t_lista *Lista; Lista = (t_lista*) malloc (sizeof(t_lista)); Lista->qtde = 0; Lista->ptrFncEscreve = EscreveInteiro; return Lista; } t_nodeL* Cria_NoLista...
asked by 21.03.2017 / 14:16
1
answer

Program with 3 files

I made a code in c ++ that works if it's all inside main.cpp. When I create other files, such as a header it gives the undefined reference error. I've done everything and only managed to make it work with a single source file. Can you help me ?...
asked by 28.03.2017 / 22:58