Questions tagged as 'c'

2
answers

Problem with functions and arrays in C

I do not understand why the program does not do what I order in the functions and it simply prints on the screen the two "printf" that I use test in the main. #include <stdio.h> #define MAX 10 void leerVect(int vect[MAX]); void escribirV...
asked by 28.10.2018 / 03:04
1
answer

fread and fwrite with double pointers in c

I'm trying to write an array of structures to a binary file but when I call the function fwrite does not save anything in the file. Edit: I add the page definition typedef struct Pagina Pagina; struct Pagina { char *Instrucción; char *r...
asked by 26.06.2018 / 06:54
1
answer

Problem with Data structure in C - Trees

I have a problem with the definition and creation of data structures to use trees. The structures that I must use if or if and should not change is the following: #define INT 1024 #define CHAR 1025 #define STRING 1032 #define LIST 1033 #define...
asked by 25.05.2018 / 02:50
1
answer

how to relate pointers to char with Strings

Good afternoon I need some help to get closer to my solution, in C when it is executed by console and files are included these are declared in the main statement with a pointer to char pointers (array of Strings) but then I need to store those v...
asked by 05.05.2018 / 16:44
1
answer

fwrite does not write to file

I have this hex_editor.exe program in c that reads from a text file with this format: 065_066_067_097_098_099_013_010_049_050_051 052_053_054_013_010_065_114_114_111_122_032 121_032_108_101_099_104_101_013_010_100_111 013_010_013_010_119_104_1...
asked by 28.03.2018 / 18:15
1
answer

doubt with malloc

#include<stdio.h> #include<stdlib.h> int main(){ int *pi; pi=malloc(sizeof(int)); *pi=5; printf("%d\n",*pi); pi=5; printf("%d\n",pi); puts(""); char *cadena; cadena=malloc(5*sizeof(char)); cadena="ho...
asked by 26.04.2018 / 00:17
1
answer

C ++ compiler for windows 10

I am looking for a compiler that supports the clrscr instructions, I have read that the error seems to be in the conio.h library. I have tried the mingw but it gives me the following error:    C: \ tesisv3> gcc sumar2....
asked by 14.06.2018 / 21:07
1
answer

Instanced properties vs in class, C orienting objects with glib (GTK +)

Without so many detours hopefully I can help with something that has me stranded a whole week, I have a serious confusion with GTK + and its object system, reading the documentation of the GNOME project I understood that uses GType to have a lis...
asked by 26.02.2018 / 20:16
1
answer

C chain overflow

Is there one? It's a question of someone who is starting to program, but for example, if I declare this: char cadena[11]; Why would you let me assign you a string that has 30 elements? Should not there be a memory overflow and sh...
asked by 17.02.2018 / 21:01
1
answer

How to capture the close event of a MessageBox

I have the doubt to know if the event Close of a MessageBox can be captured. Clearly the application runs on windows CODE: MessageBox(0,"Title","description",1); Now it's working, that is, it jumps a MessageBox on...
asked by 16.04.2018 / 23:05