Questions tagged as 'c'

1
answer

Comment count // and / * * / in C

I'm trying to do a program in C that opens a file .txt , .c or any other in read mode, to count the comments made with // or /* */ . I'm doing the following way: #include <stdio.h> #include <string.h> #i...
asked by 29.11.2015 / 18:47
1
answer

How to create a dynamic array using list chained in C language?

Please help me with what power on the subject, I am having difficulties with data structure in college. Thanks in advance. What I already have for coding! typedef struct tipoElemento { int valor; struct tipoElemento *abaixo; struct t...
asked by 13.09.2017 / 03:40
1
answer

Create function strstr / Return pointer in C

I'm trying to redo the function strstr (search for a value passed by a parameter in a text, if it finds it shows the rest) per account. This is my current code, it already came to work but I gave some miss click and stopped working for some r...
asked by 31.10.2017 / 09:20
3
answers

Key Capture

I'm developing a game of C language snippet ( gcc 4.9.2 ) for the Ubuntu terminal 15.04 . I need to capture a key typed by the user so he can change the direction in which the copper walks ( w up, s down, a left, d...
asked by 30.06.2015 / 00:49
1
answer

Nested pointers and references

I have a question in interpreting (in the form I read my code) in assignments in pointers in the C language. I did not understand the logic of the following assignments: "If i and j are integer variables and p and q...
asked by 06.09.2015 / 19:13
1
answer

How to manipulate widgets of the main window through a signal function (C and GTK +)?

I have very little experience and I am coding a program for a college job. I'm using the GTK + 2.0 library. There are several widgets in the main window, among them a button that I connected to a function. The problem is that I would like...
asked by 27.12.2014 / 17:48
1
answer

Working with interrupts in C compiling for pc

When trying to answer a question on the site I started a dense search of how to work with interrupts in C. Interruptions for those who did not understand works as follows: I'm running my program normally, as soon as something happens, re...
asked by 07.11.2014 / 19:50
1
answer

How to center one window in the other in GTK?

I have a main window and want to display small text in a small window, open in the center of the main window. I still can not get the small window to open in the center of the main. I tried to use GTK_WINDOW_TOPLEVEL and GTK_WINDOW_...
asked by 06.02.2014 / 19:51
2
answers

Reading an array from a file

I want to read from a file that has an array inside, the amount of rows and columns and printable on the screen, but my program does not appear anything, it simply stops and does not start the number of lines (counterL) and columns (counterC)....
asked by 28.06.2015 / 03:59
1
answer

Print special characters in c that are in a .txt file with library locale.h

My college end-of-school program has several screens that print large arquivo.txt , but as I do in C , some characters do not appear, such as ç, é, ã... And so on. I discovered a library called locale.h . With it you can w...
asked by 28.11.2015 / 20:42