Re: variable initialization / I'm a n00b
- From: John Smith <JSmith@xxxxxxxx>
- Date: Wed, 31 Jan 2007 18:42:28 GMT
rjtucke wrote:
Hi all- this is my first post here- just a quick question:
#include <math.h>
double foo = cosh(0.621);
int main() {
return 0;
}
fails with
error: initializer element is not constant
In addition to telling me what I'm doing wrong, could you please refer
me to an appropriate reference for related questions? I've been doing
my reading (open net + safari bookshelf), but I don't know where to
look. Even if I have to (sigh) buy a book, I would appreciate your
pointers.
Thanks and regards,
Ross
"K&R" is "The C Programming Language" by Brian Kernighan & Dennis Ritchie. Ritchie is the inventor of C and this is the definitive book on the language. If you are already familiar with programming in general, it's a good place to start learning C. If not, there are books better oriented to beginners.
Online (among many other good sites) see:
http://c-faq.com/
http://clc-wiki.net/wiki/
.
- Follow-Ups:
- Re: variable initialization / I'm a n00b
- From: Eric Sosman
- Re: variable initialization / I'm a n00b
- References:
- variable initialization / I'm a n00b
- From: rjtucke
- variable initialization / I'm a n00b
- Prev by Date: Re: C bit twidders ... I'm in need of a dose of clever.
- Next by Date: Re: Does Casting Slow a Program Down?
- Previous by thread: Re: variable initialization / I'm a n00b
- Next by thread: Re: variable initialization / I'm a n00b
- Index(es):
Relevant Pages
|