Questions tagged as 'c'

2
answers

Remove array element in C

I have the following struct. struct cadastro{ int codigo; char nome[200]; char cpf[11]; char rg[10]; char tel[12]; char end[100]; }cadastro;//struct do tipo cadastro. and the corresponding vector struct cadastro cd[10];//vetor da funcao...
asked by 10.05.2016 / 21:54
2
answers

How to Save \ Read threaded list to file?

I'm very new to programming and I'm coding this program for a college job. It is a "pizzeria manager", I need to save \ a linked list (customer list) in a file, so that the data is not lost when the program is closed. But how can I do this...
asked by 02.01.2015 / 01:56
1
answer

How to find out the number of rows and columns of a dynamically created array?

Based on my knowledge, I created a function that returns an initialized array: int** initMatriz(int rows, int cols){ int i,j; int** matriz; //aloca memoria para todas as linhas matriz = (int**) malloc(rows * sizeof(int*));...
asked by 01.11.2015 / 04:03
1
answer

Char count in C

I have a function in C that should receive a string, and pointers that have the number of numbers and vowels that are present in the string, but the function is not adding up each time it finds a number or a vowel. Here is my code: int main(){...
asked by 21.05.2015 / 20:38
2
answers

Read data from files separated by commas in C

I need to read data from an entry in the format:    100, Refrigerator, 180,90,89,1200.00,4, white After some search, I found the strtok function that separates the data between the commas, and the code looks like this: #include <stri...
asked by 02.12.2014 / 05:14
1
answer

Get open window headings

I have a program in C ++ that comes to a certain extent that I need to check if a window is open, if it does execute a part of the code. How could I get the windows open and do this check?    I found a link that could help with this, the l...
asked by 05.12.2014 / 14:27
1
answer

Error comparing two strings

I'm trying to compare two strings , so when I enter a name in my threaded list it can not be inserted if it already exists. I have already used the search_name function to display a searched name and to exclude, but now it is simply giving s...
asked by 05.12.2014 / 20:05
1
answer

Loop problem for

I have a problem and I can not identify it in my code, I have a for 60 iterations, and it is falling on if's when I identify it (i in this case) is divisible by 5 or by 3 only in the first iteration , when i is 0. After this it passes the others...
asked by 30.06.2015 / 00:55
1
answer

How to extend the storage capacity of char variables

Hello! I'm having problems with a "mini dictionary" that I'm putting together .... it's basically done, but the definition of the words, because they are too long, present an error when they are displayed. I suppose it's because of some limitati...
asked by 31.08.2014 / 00:13
1
answer

Automatic ticket generator

I'm developing the Dijkstra minimum path calculation algorithm using C language, I'm making several solutions to the same problem and then testing which one is most efficient. For this I needed to generate multiple entries, including huge ent...
asked by 20.09.2014 / 19:46