Questions tagged as 'c'

1
answer

error: invalid use of undefined type 'Row struct'

I am implementing a queue to control the threads created, in C . So while the thread is not the first in the queue it waits to be terminated. example: // // Enquanto não é primeira da fila // while(idd != PPFila.dados[PPFil...
asked by 27.07.2016 / 13:15
1
answer

'System.NullReferenceException' in C

Running the following code it displays the error System.NullReferenceException in the call of the function SubString #include <stdio.h> #include <stdlib.h> #include <string.h> // // Implementado o met...
asked by 28.07.2016 / 16:18
1
answer

Space spent by variables

Hello, I would like to know how I can calculate the amount of space spent per code variable, function. Example I have a code to sort a list doubly chained by SelectSort, however I want to calculate the space spent and I have no idea I thoug...
asked by 25.06.2016 / 20:47
1
answer

remove a specific item from a list chained in c [closed]

I have to struct LDISP { int idAviao; struct LDISP *prox; }; typedef struct LDISP ldisp; I already have the process of adding I would like to know how I can remove from an ldisp list an item whose int has equal idaviao     
asked by 17.04.2016 / 20:44
3
answers

C pointers, error invoking the reallocation function

I have the C code written below, whenever I want to invoke the function of an error that says: - / home / samuel-o-face / Documents / Data Structures and Algorithm / Class 13.04.16 AllocatingMemory / main.c | 80 | error: conflicting types for 'a...
asked by 17.04.2016 / 08:12
1
answer

Separate array and save in strings for later use

I have a loop for * which counts from 1 to 8 and saves to an array call str , but I I would like that when the variable str reaches 8 the value of str[i] in the array str_line[b] Example: The f...
asked by 20.04.2016 / 14:05
1
answer

CodeBlocks - "It seems that this project has not been built yet. Do you want to build it now? "- How do I solve this?

It seems that codeblocks can not find the folder where my project is. I have tested the separate compiler and it is working perfectly. Does anyone know how I solve this? See: gcc -Wall -g -c "/home/ehecatl/Área de Trabalho/programacao-c/Le...
asked by 21.04.2016 / 21:14
1
answer

Two-dimensional array size within the struct in C

Hello. I'm doing a job that I read a txt (the file name is passed by argv []) and it generates a graph. In the first line of the file two parameters are passed as follows: GO These parameters are integers and have a meaning: V = number of vertic...
asked by 20.03.2016 / 17:29
1
answer

How do you assign data to a struct by reading from a CSV file?

I am having difficulty assigning read values from a file in csv format to one struct, my file has the following structure: 1;República Checa;156.9 2;Irlanda;131.1 3;Alemanha;115.8 4;Austrália;109.9 5;Áustria;108.3 And my code looks like thi...
asked by 23.04.2016 / 05:52
2
answers

Is there any way I can change the range of the rand function in the middle of the C code?

Hello, I was solving a college question about a "game" where you should think of a number and the machine should try to hit your number. I was able to do this work by creating a "formula" for it to find the value that the user thinks, but I woul...
asked by 15.05.2016 / 01:14