I've solved it!
The problem was I needed to put functions prototypes in common.h
Type: Posts; User: JOCAAN
I've solved it!
The problem was I needed to put functions prototypes in common.h
so... ok, but how can I manage to use the functions declared in common.h? :)
... i mean in common.c
I've removed the #include "common.c" in my files and I've add #include "common.c" in "common.h".
When I compile I get a lot of errors:
common.c:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or...
Hi,
I'm working in a project with multiples c files and I have a file called common.h (a common header file) and a file called common.c for functions.
I have some functions declared in common.c...
Thanks!
Hi,
I've been doing some research in order to start working in a project using pthread.h library and I can't figure out what does the third argument (used to determine the function to be invoqued in...
Thank you it works!
Thank you Salem so I make a dup(1) before the code in the first post and after this piece of code I make a close(1) to close the new standard output. Howevere, now screen is no longer standard...
Hi,
I have this code where I put the standard output of my program from the screen to the pipe called "p4".
close(p4[0]);
close(1);
dup(p4[1]);
close(p4[1]);
Thanks Adak. I've done some research (by the way I post two good links that have helped me, link 1 and link 2).
Now I've come up with this and when I debug the function getarg seems to...
Hi, I want to save a text file as a linked list of registers.
I have the following text file:
IBE0476 835 N 7 11 2010 374 N
IBE0477 835 N 14 11 2010 374 N
IBE3490 1045 O 17 11 2010 1023 I...
Thank you. :)
Oh, thank you very much tabstop. That's right. I was stuck so much time in this silly thing! :)
Hi,
I have a problem with char arrays and pointers. I think it's an obvious begginer issue but I can't figure out why do I get this.
I have this piece of code in my program:
...
Thank for your answer, CommonTater!
I forgot to say that my variable is actually a pointer
char* buffer = [03"code"];
so i assume the answer is now:
strcpy(buffer2, buffer[2]);
right?...
Hi there,
I have to select all the characters of a string but the first and the second one.
I mean I have a variable called buffer like this:
char buffer = [03"code"];
and I need to get a...
I would like to sort a simple linked list using swap-sort method what in arrays would be:
for (i=MIN; i<MAX; i++) {
for (j=MIN; j<MAX-1; j++) {
if v[j] > v[j+1] {
...
Hi, I'm writing C code for a project and I would like to know (if it's possible) how to make an array of arrays. I mean I want to place a bidimensional array inside each one of the elements of an...
Just an apparently simple question. How to pass pointers by reference in C?
What I mean is how to get a memory address to be modified inside a function or procedure and to be able to pass this...
This is the code that can be compiled:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Hi, I get an unhandled exception in this code:
while(strcmp(nom, linia_tren->nom_linia) != 0){
linia_tren++;
}
while((strcmp(parada1,...
Why do I get this error?
do{
(linia_tren->dades_parades)++;
}while(strcmp(parada1, (*linia_tren).(*dades_parades).nom_parada) != 0 && strcmp(parada2,...
The code is just a practice about pointers and it has just a learning purpose.
Yes, the program was wrong due to both errors thank you!
Thanks to Elysia too, I'll try to stop using fflush...
I still can't found the cause of the error.
This is the whole code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
I get a runtime error when I debug my program. The error is: unhandled exception myprogram.exe 0x0000005: Access Violation. I use VS 6.0 and windows xp. Here is the line when I get the error:
...