Re: segmentation error in c programming.

2003-08-28 Thread reza saeidinia
Hello This is not a file only. this is a project with about 200 files (c,h). and I write a file and add it to the project .the other files were compile without error but when runing my file the error segmentation fault apear. I think when the equalitty t=mat1[i][j] the error accoured. when the matr

Re: segmentation error in c programming.

2003-08-27 Thread Jonathan Bartlett
I don't see where you are setting "n". Give a complete program as a testcase and I'll look into it. Jon On Wed, 27 Aug 2003, reza saeidinia wrote: > Hi. > I hava a program that contains following codes : > static int ** mat1=NULL; > static int * a=NULL; > mat1=(int **) malloc((sizeof (int *)*n)

segmentation error in c programming.

2003-08-27 Thread reza saeidinia
Hi. I hava a program that contains following codes : static int ** mat1=NULL; static int * a=NULL; mat1=(int **) malloc((sizeof (int *)*n)); for (i=0; i    mat1[i]=(int *) malloc(sizeof(int)*n); a=(int *) malloc(sizeof(int)*n); for (i=0;i     for (j=0;j mat1[i][j]=0; printf("ok"); /*commen

Re: A c programming question?

2003-07-30 Thread Jonathan Bartlett
It means you forgot to include a "main" function - that's where the program starts. Let me know if you need more help. This can happen if you forget to specify '-c' when compiling source files individually. Jon On Wed, 30 Jul 2003, reza saeidinia wrote: > Hello . > whats the following messages

Re: A c programming question?

2003-07-30 Thread Wartnick, James
: mark <[EMAIL PROTECTED]> Organization: 24.5 Century Productions, unLtd. To: [EMAIL PROTECTED] Subject: Re: A c programming question? Date: Wed, 30 Jul 2003 09:16:57 -0400 Reply-To: [EMAIL PROTECTED] On Wednesday 30 July 2003 06:00 am, >

Re: A c programming question?

2003-07-30 Thread mark
On Wednesday 30 July 2003 06:00 am, > From: reza saeidinia <[EMAIL PROTECTED]> > whats the following messages mean: > /usr/lib/gcc-lib/i386-redhat-linux/2.96/crt1.o In function ''_start': > /usr/lib/gcc-lib/i386-redhat-linux/2.96/crt1.o(.text+ox18):undefined > refrence to 'main' thank you. That

Re: A c programming question?

2003-07-30 Thread fred smith
On Wed, Jul 30, 2003 at 01:11:23AM -0700, reza saeidinia wrote: > Hello . > whats the following messages mean: > /usr/lib/gcc-lib/i386-redhat-linux/2.96/crt1.o In function ''_start': > /usr/lib/gcc-lib/i386-redhat-linux/2.96/crt1.o(.text+ox18):undefined refrence to > 'main' > thank you. it means

A c programming question?

2003-07-30 Thread reza saeidinia
Hello . whats the following messages mean: /usr/lib/gcc-lib/i386-redhat-linux/2.96/crt1.o In  function ''_start': /usr/lib/gcc-lib/i386-redhat-linux/2.96/crt1.o(.text+ox18):undefined refrence to 'main' thank you.   Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software

RE: C Programming

2003-06-27 Thread Bailo, John
Why not learn c# for linux ? I am and its great! Check out: http://www.dotgnu.org -Original Message- From: Lazor, Ed [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2003 2:43 PM To: [EMAIL PROTECTED] Subject: RE: C Programming I'm not new to programming, but it's been y

Re: C Programming

2003-06-27 Thread rm
On Fri, 2003-06-27 at 15:05, Lazor, Ed wrote: > Know of any good mailing lists for C Programming on RedHat A great resource for C and C++ programming. Some of these guys are really good. http://www.cprogramming.com/board.html I've never found anything specific to Redhat in C pro

RE: C Programming

2003-06-27 Thread Lazor, Ed
I'm not new to programming, but it's been years since I coded in C. I'm working with a pre-established project done in C. Thanks in advance for any advice you have. -Ed > -Original Message- > How do you find the max index of an array? > > Depends on whether or not the array is null t

Re: C Programming

2003-06-27 Thread Gordon Messmer
Lazor, Ed wrote: Both actually. The specific question I'm trying to answer right now is... How do find the max index of an array? Depends on whether or not the array is null terminated. :) C is not a language I'd recommend to new programmers. Have you considered learning Python, or do you have

Re: C Programming

2003-06-27 Thread Darío Mariani
The http://vger.kernel.org/majordomo-info.html list called linux-c-programming has very low traffic and people that are with linux from its beggining and are willing to help anyone. Lazor, Ed wrote: Both actually. The specific question I'm trying to answer right now is... How do find th

RE: C Programming

2003-06-27 Thread Jonathan Bartlett
What do you think? > > -Ed > > > > > -Original Message- > > On Friday 27 June 2003 21:05, Lazor, Ed wrote: > > > Know of any good mailing lists for C Programming on RedHat? > > > -Ed > > > > > > That's kind of a tall or

Re: C Programming

2003-06-27 Thread MKlinke
On Friday 27 June 2003 21:30, Lazor, Ed wrote: > Both actually. > > The specific question I'm trying to answer right now is... How do > find the max index of an array? > > I tend to come up with a lot of questions like that as I'm learning > and any mailing lists would be helpful. I'm doing networ

RE: C Programming

2003-06-27 Thread Lazor, Ed
7;m assuming RedHat specific lists would be ideal. What do you think? -Ed > -Original Message- > On Friday 27 June 2003 21:05, Lazor, Ed wrote: > > Know of any good mailing lists for C Programming on RedHat? > > -Ed > > > That's kind of a tall orde

Re: C Programming

2003-06-27 Thread MKlinke
On Friday 27 June 2003 21:05, Lazor, Ed wrote: > Know of any good mailing lists for C Programming on RedHat? > -Ed That's kind of a tall order there Ed. Are you looking for beginner's level programming to learn the 'C' language or somthing that'll help with th

C Programming

2003-06-27 Thread Lazor, Ed
Know of any good mailing lists for C Programming on RedHat? -Ed DISCLAIMER: This message is intended for the sole use of the individual to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the

Re: newbie C programming question

2003-01-02 Thread Christopher Henderson
That did it - thnx! ~Christopher On Thu, 2003-01-02 at 02:38, Willem Brown wrote: > Christopher Henderson wrote: > > I'm trying to teach myself C and I'm having trouble compiling my first > > program. This is following the C Tutorial at > >

Re: newbie C programming question

2003-01-02 Thread Gordon Messmer
On Thu, 2003-01-02 at 00:18, Christopher Henderson wrote: > My first program, a simple "Hello World", is as follows > > #include < stdio.h> > > void main() > { > printf("\nHello World\n"); > } > > I go to a console and type gcc hello.c as stated in the tutorial and get > the following error

Re: newbie C programming question

2003-01-02 Thread Willem Brown
Christopher Henderson wrote: I'm trying to teach myself C and I'm having trouble compiling my first program. This is following the C Tutorial at . My first program, a simple "Hello World", is as follows #include <

newbie C programming question

2003-01-02 Thread Christopher Henderson
I'm trying to teach myself C and I'm having trouble compiling my first program. This is following the C Tutorial at . My first program, a simple "Hello World", is as follows #include < stdio.h> void main() { p

Re: "c" programming question - regexec related

2001-01-11 Thread Bruce A. Mallett
Some of my programs use regcomp/regexec on RH7 and I've not seen a problem. Memory problems can be most insidious .. you might want to compile against something like efence or (if you've the luxury of a platform supporting it), Purify. - Bruce Rick Forrister wrote: > Am having a problem w

"c" programming question - regexec related

2001-01-11 Thread Rick Forrister
Am having a problem with a regcomp/regex expression in a program I'm working on; one of the compiled regex_t structs appears to become corrupted after about 3 calls to regexec. Which leads to a crash of the program. Wondering if anyone else has seen this behaviour; it's occuring on RH 7.0 with

Re: C programming question...[OT]

2000-05-08 Thread Neil Hollow
Can anyone recommend a good c programming newsgroup for general questions and queries. NH -- >From: Sam Bayne <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: C programming question...[OT] >Date: Fri, May 5, 2000, 3:42 am > >First of all, thank everyone

Re: C programming question...[OT]

2000-05-05 Thread Gordon Messmer
Sam Bayne wrote: > Hee hee, perl doesn't have pointers, but it DOES have references. Really? I thought those were new in Perl 5.6. > they have some idiot protections WRT segfault.) The thing that is really > confusing about C's pointers is not the "they're memory locations" > thing, > it's the

Re: C programming question...[OT]

2000-05-05 Thread Steve Borho
On Fri, May 05, 2000 at 01:24:30PM -0400, rpjday wrote: > On Fri, 5 May 2000, Ken Gosier wrote: > > > > > --- Steve Borho <[EMAIL PROTECTED]> wrote: > > > Speaking to just pure style, though, that while loop > > > reminds me of the > > > most efficient C snippet I've ever seen. It's the > > > s

Re: C programming question...[OT]

2000-05-05 Thread rpjday
On Fri, 5 May 2000, Ken Gosier wrote: > > --- Steve Borho <[EMAIL PROTECTED]> wrote: > > Speaking to just pure style, though, that while loop > > reminds me of the > > most efficient C snippet I've ever seen. It's the > > standard implementation > > of strcpy. > > > > for (;*s;) > >

RE: C programming question...[OT]

2000-05-05 Thread Mike McNally
> --- Steve Borho <[EMAIL PROTECTED]> wrote: > > Speaking to just pure style, though, that while loop > > reminds me of the > > most efficient C snippet I've ever seen. It's the > > standard implementation > > of strcpy. > > > > for (;*s;) > > *d++ = *s++; > > > One question about th

Re: C programming question...[OT]

2000-05-05 Thread Ken Gosier
--- Steve Borho <[EMAIL PROTECTED]> wrote: > Speaking to just pure style, though, that while loop > reminds me of the > most efficient C snippet I've ever seen. It's the > standard implementation > of strcpy. > > for (;*s;) > *d++ = *s++; One question about this code snippet: Won't

Re: C programming question...[OT]

2000-05-04 Thread Sam Bayne
First of all, thank everyone for helping me out with idiotic basic questions. Gordon Messmer wrote: > > 1) No, the programmers declared an array of 5 character pointers, not > an array of 5 characters. Perl 5 doesn't have pointers, so I understand > your confusion :) They're one of the things

Re: C programming question...[OT]

2000-05-04 Thread Tim Hockin
> #define MAXARG 4 > static char *dirs[MAXARG+1]; a 5 element array of pointers to characters (strings). > ac--; av++; > if (ac==0) dirs[0] = "/tftpboot"; /* default directory */ > while (ac-- > 0 && n < MAXARG) > dirs[n++] = *av++; > 1

Re: C programming question...[OT]

2000-05-04 Thread Steve Borho
On Thu, May 04, 2000 at 05:23:37PM -0700, Sam Bayne wrote: > while (ac-- > 0 && n < MAXARG) > dirs[n++] = *av++; > > 3. Stylistically, is that 'while' statement normal? It looks to > me like a syntax mistake waiting to happen, but I'll code > to th

Re: C programming question...[OT]

2000-05-04 Thread Gordon Messmer
1) No, the programmers declared an array of 5 character pointers, not an array of 5 characters. Perl 5 doesn't have pointers, so I understand your confusion :) They're one of the things that non-C programmers bitch about. (If you don't understand pointers, using them is a quick way to a segfau

Re: C programming question...[OT]

2000-05-04 Thread Steve Borho
On Thu, May 04, 2000 at 05:23:37PM -0700, Sam Bayne wrote: > So There I am, rooting around in the source to the tftpd server > (never you mind why) when I see this: > > - > #define MAXARG 4 > static char *dirs[MAXARG+1]; > > int > main(int ac, char *

C programming question...[OT]

2000-05-04 Thread Sam Bayne
So There I am, rooting around in the source to the tftpd server (never you mind why) when I see this: - #define MAXARG 4 static char *dirs[MAXARG+1]; int main(int ac, char **av) { register struct tftphdr *tp; register int n = 0;

Linux C Programming List [ANNOUNCE]

1999-11-30 Thread lloy0076
LINUX C PROGRAMMING LIST David Lloyd, creator of the Linux C Programming Lists, is slowly working his way to attracting 1000 members to the list! Currently with a membership of approximately 680 people, the Linux C Mailing lists are about programming linux with C. With

Re: (OT) UNIX (non-X11) C++ programming texts?

1998-04-27 Thread Dave Wreski
> I'm looking to buy a text that deals with system-level programming in C++ > (not so much C). Ideally it would have many short real-world example > programs. Can someone recommend a book like this? Also, my dream book at > present would be called *RDBMS/SQL Programming for UNIX*. Pipe dream?

Re: (OT) UNIX (non-X11) C++ programming texts?

1998-04-27 Thread Paul Fontenot
> I'm looking to buy a text that deals with system-level programming in C++ > (not so much C). Ideally it would have many short real-world example > programs. Can someone recommend a book like this? Also, my dream book at > present would be called *RDBMS/SQL Programming for UNIX*. Pipe dream?

(OT) UNIX (non-X11) C++ programming texts?

1998-04-27 Thread Jeff
Greetings. I'm looking to buy a text that deals with system-level programming in C++ (not so much C). Ideally it would have many short real-world example programs. Can someone recommend a book like this? Also, my dream book at present would be called *RDBMS/SQL Programming for UNIX*. Pipe dr

Re: C programming......HOWTO begin...?

1998-04-15 Thread Deryk Barker
Once upon a time Edmunds, Keith wrote: > > On Friday, April 10, 1998 2:46 PM, Jacek Andreas Matulla > [SMTP:[EMAIL PROTECTED]] wrote: > > well I know someone who wants to learn C++ or C programming. As I just use > > Linux, I have no idea about programming > >

RE: C programming......HOWTO begin...?

1998-04-15 Thread Edmunds, Keith
On Friday, April 10, 1998 2:46 PM, Jacek Andreas Matulla [SMTP:[EMAIL PROTECTED]] wrote: > well I know someone who wants to learn C++ or C programming. As I just use > Linux, I have no idea about programming On the whole C programmers fall into two categories: those who started

Re: C programming......HOWTO begin...?

1998-04-15 Thread James Youngman
>>>>> "elg" == "Eric L Green <[EMAIL PROTECTED]>" <[EMAIL PROTECTED]> writes: elg> No, but Kernighan and Ritchie, "The 'C' Programming Language", elg> is. It's the kind of book they don't make anymore -- slim

Re: Learning C/Programming/Algorithms

1998-04-14 Thread Raj Singh
Hi, I would recommend the following for the topics of Data Structures and Algorithms : 1. Horowitz and Sahani, _Fundamentals of Computer Algorithms_. 2. Sedgewick, _Algorithms in C_, Addison-Wesley. There is another edition on C++. 3. Sengupta and Edwards, _Data Structures in ANSI C_. 4. Me

Re: C programming......HOWTO begin...?

1998-04-13 Thread Rich Shepard
On Mon, 13 Apr 1998, Eric L. Green <[EMAIL PROTECTED]> wrote: > On Fri, 10 Apr 1998, Mike Bridge wrote: > > My most-used C reference book is Harbison & Steele's "C: A Reference Manual", > > but it's not really a good introductory book. > No,

Re: C programming......HOWTO begin...?

1998-04-13 Thread Eric L. Green <[EMAIL PROTECTED]>
On Fri, 10 Apr 1998, Mike Bridge wrote: > My most-used C reference book is Harbison & Steele's "C: A Reference Manual", > but it's not really a good introductory book. No, but Kernighan and Ritchie, "The 'C' Programming Language", is. It&

Re: C programming......HOWTO begin...?

1998-04-10 Thread Mike Bridge
> Date: Fri, 10 Apr 1998 12:21:25 EDT > From: GBNSCHBACH <[EMAIL PROTECTED]> > To:[EMAIL PROTECTED] > Subject: Re: C programming..HOWTO begin...? > Since Unix C and Windows C are different, start with Linux and get >

Re: C programming......HOWTO begin...?

1998-04-10 Thread GBNSCHBACH
Since Unix C and Windows C are different, start with Linux and get Steve Kochan's book Programming in C, later on get Topics in C. Another good book is Kelly and Pohl - A book on C. -- PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES! http://www.redhat.

C programming......HOWTO begin...?

1998-04-10 Thread Jacek Andreas Matulla
Hi all, well I know someone who wants to learn C++ or C programming. As I just use Linux, I have no idea about programming So someone could tell me how to begin with...? He wants to learn C under Linux and M$Windows.as much as I know, it's possible to develop software for Windows