Forum: C May 18th, 2008 |
| Replies: 8 Views: 1,707 Sorry for the double post, it was an accident. |
Forum: C May 18th, 2008 |
| Replies: 8 Views: 1,707 thanks vijayan121, this solved my problem.
Duoas, i wanted to swap the arrays inside the function...
-nicolas |
Forum: C May 16th, 2008 |
| Replies: 8 Views: 1,707 nop man this won't work.... because i am asking about variable lenght arrays....
check this out::
http://www.ddj.com/cpp/184401444 |
Forum: C May 16th, 2008 |
| Replies: 8 Views: 1,707 the way i think it, i try to avoid copying anything than 2 pointers... maybe the thread title is a bit misleading
maybe a moderator could change to something like "swap the pointers to 2 arrays"... |
Forum: C May 16th, 2008 |
| Replies: 8 Views: 1,707 hi guys, it's been a while since i used c for anything so here goes a question tha may seem silly.
I have 2 variable length arrays....
int main()
{
int n = 5; |
Forum: C Jan 5th, 2008 |
| Replies: 5 Views: 879 it seems that this
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
error appears when in the declaration of a functions you miss a ; in the end... |
Forum: C Jan 1st, 2008 |
| Replies: 5 Views: 879 searching a bit i found this::
/*
* C99
* 6.5.3.4.2
* The sizeof operator yields the size (in bytes) of its operand,
* which may be an expression or the parenthesized name
* of a... |
Forum: C Jan 1st, 2008 |
| Replies: 5 Views: 879 THANK YOU duoas... i 've been looking this code for one hour before i post here trying to find the error.... can i ask something though:
why sizeof nameval_t was wrong? |
Forum: C Jan 1st, 2008 |
| Replies: 5 Views: 879 I wish a happy 2008 to everyone on this forum.
I just obtained the practise of programming{by the way it seems like a great book...}
and i have the following code for linked list:
#include... |
Forum: C Jan 1st, 2008 |
| Replies: 10 Views: 2,815 Well....YES...it's stupid i know, but that's how it works....and they are very strict about that.
THANX for your help people...appriciate it....will try to implement some of the things you told... |
Forum: C Dec 26th, 2007 |
| Replies: 7 Views: 1,208 you are right... the book mentions this trick when it talks about process implementation....
-nicolas
thank you all for your help!! |
Forum: C Dec 24th, 2007 |
| Replies: 7 Views: 1,208 can you elaborate a bit more, because i still can't quite get it....
shouldn't then be written like this
int (*call_vec[])(void)
thank you both for your answers!
-nicolas |
Forum: C Dec 24th, 2007 |
| Replies: 7 Views: 1,208 hi,
i am reading the book "Operating Systems Design and Implementation 3rd edition" which analyzes the minix source code... in the part of filesystems we see this code
PUBLIC _PROTOTYPE (int... |
Forum: C Dec 24th, 2007 |
| Replies: 7 Views: 1,850 thank you sarehu your answered covered me... if you know why is it necessary to make this #define _GNU_SOURCE thing, i haven't seen this mechanism been used in std library functions before...
... |
Forum: C Dec 23rd, 2007 |
| Replies: 7 Views: 1,850 hi guys,
i have the following code:
main.c
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <limits.h> //defines PATH_MAX |
Forum: C Dec 17th, 2007 |
| Replies: 4 Views: 734 i solved the problem after all.... it seems that the options std=c99 created the problem with the inclusions{unfortunately i don't know why} plus me forgeting to include list.o ... now everything... |
Forum: C Dec 17th, 2007 |
| Replies: 4 Views: 734 basically i zipped it with fedora... |
Forum: C Dec 17th, 2007 |
| Replies: 4 Views: 734 hi, i have the following program
see the attachment
when i try to compile through the command line {with the scipt compile} everything works fine...
when i try to use my makefile...i get... |
Forum: C Nov 20th, 2007 |
| Replies: 8 Views: 1,078 i read the tutorials on input.Excellent work from Dave Sinkula.
It seems that my biggest mistake concerning fgets was that i didn't know this::
When the incoming text is one less than the size of... |
Forum: C Nov 20th, 2007 |
| Replies: 1 Views: 1,085 in the book "advanced programming in the unix environment"
the authors give the following function to "deamonize" a process
void daemonize(const char *cmd)
{
int i, fd0,... |
Forum: C Nov 20th, 2007 |
| Replies: 8 Views: 1,078 thank you all for your help... :) |
Forum: C Nov 18th, 2007 |
| Replies: 8 Views: 1,078 thanks salem, it works! I understand why your code solves the problem "type the wrong thing"...
The thing i can't understand is why scanf can't work together with fgets...i think i 've read... |
Forum: C Nov 18th, 2007 |
| Replies: 8 Views: 1,078 hi, i have the following problem::
i want to read a string from the stdin. The string may contain white spaces so {i think} the scanf family of functions is out of the question... I think the most... |
Forum: C Nov 18th, 2007 |
| Replies: 4 Views: 1,511 |
Forum: C Nov 16th, 2007 |
| Replies: 4 Views: 1,511 thanks for your answer salem,
so to do this properly i should send the componenets of the struct one by one?
PS:: i didn't mention on my first post that the communication will be in the same... |
Forum: C Nov 16th, 2007 |
| Replies: 4 Views: 1,511 hi, i was wondering if it is possible to send a struct through sockets...
thanks in advance,
nicolas |
Forum: C Oct 27th, 2007 |
| Replies: 2 Views: 3,477 hi, i want to begin socket programming and interprocess communication but i don't where to begin....can anyone suggest some sources??
thanks in advance,
nicolas
PS:: sorry if the question is... |
Forum: C Mar 18th, 2007 |
| Replies: 7 Views: 1,755 Sorry, for not answering earlier...i didn't have access to an internet conncetion....
I didn't know that what i wanted was called "full-screen textmode application"...
For all it matters i have... |
Forum: C Mar 15th, 2007 |
| Replies: 7 Views: 1,755 hi,
i want to develop a console interface for a program that i made{a university project}......
so i was wondering if anyone {with expertise in this matter} can supply me with links or... |
Forum: C Feb 22nd, 2007 |
| Replies: 5 Views: 1,378 so i would use out<<mystring<<endl? |
Forum: C Feb 22nd, 2007 |
| Replies: 5 Views: 1,378 yes but if in a i had a string field??i would write::
out.write((char*)&str,sizeof(string));?????? |
Forum: C Feb 22nd, 2007 |
| Replies: 5 Views: 1,378 hi,
i want to binary write the fields of class to a file.Mainly i want to serialize only the public fields not the private ones or the functions....
class a
{ |