On Thu, 2007-10-25 at 23:19 +0200, Harald Schmalzbauer wrote:
> Am Donnerstag, 25. Oktober 2007 20:22:26 schrieb Aryeh M. Friedman:
> > > Absolutely. (I just didn't mention it before because
> > > obviously Harald already has a beginner's book on the
> > > C programming language.)
> >
> > Herald
Am Donnerstag, 25. Oktober 2007 20:22:26 schrieb Aryeh M. Friedman:
> > Absolutely. (I just didn't mention it before because
> > obviously Harald already has a beginner's book on the
> > C programming language.)
>
> Herald does in fact have one that sucks (it does a terrible job on type
> sizes fo
On 2007-10-25 Bill Moran wrote:
> In response to Oliver Fromme <[EMAIL PROTECTED]>:
>
> > Harald Schmalzbauer wrote:
> > >
> > > #include
> > >
> > > void main()
> >
> > That's not a C program. :-)
> >
> > The return value of the main function of a valid C program
> > must be int. And o
> Absolutely. (I just didn't mention it before because
> obviously Harald already has a beginner's book on the
> C programming language.)
>
Herald does in fact have one that sucks (it does a terrible job on type
sizes for example [doesn't mention that they may very on different
machines])...
On Thu, 25 Oct 2007 17:22:11 +0200
Erik Trulsson <[EMAIL PROTECTED]> wrote:
> For a beginner the standard itself is probably a bit too heavy-going.
> The book usually recommended is 'The C programming language, Second
> edition' by Kernighan and Ritchie.
> ( http://cm.bell-labs.com/cm/cs/cbook/ )
Erik Trulsson wrote:
> Oliver Fromme wrote:
> > By the way, I recommend you get a copy of the C standard
> > and use it for reference. You can buy a digital copy (PDF)
> > at http://webstore.ansi.org/ (Search for "9899-1999"),
> > it's $30. Alternatively ask Google for "C99 draft" to get
In response to Oliver Fromme <[EMAIL PROTECTED]>:
> Harald Schmalzbauer wrote:
> >
> > #include
> >
> > void main()
>
> That's not a C program. :-)
>
> The return value of the main function of a valid C program
> must be int. And of course, your main function should
> end with "return 0
On Thu, Oct 25, 2007 at 05:02:00PM +0200, Oliver Fromme wrote:
> Harald Schmalzbauer wrote:
> >
> > #include
> >
> > void main()
>
> That's not a C program. :-)
>
> The return value of the main function of a valid C program
> must be int. And of course, your main function should
> end wi
Harald Schmalzbauer wrote:
>
> #include
>
> void main()
That's not a C program. :-)
The return value of the main function of a valid C program
must be int. And of course, your main function should
end with "return 0;" or "exit(0);" (the latter requires
"#include " at the top).
By the wa
On 2007-10-23 23:24, Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
> Thanks all,
> here was my example, just for completeness, I found mentors for my
> needs.
> #include
>
> void main()
> {
> short nnote;
>
> // Numerischen Notenwert einlesen
> printf("Bitte numerischen Schulnotenwert eing
On Tue, 23 Oct 2007 23:24:09 +0200
Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
> #include
>
> void main()
> {
> short nnote;
>
> // Numerischen Notenwert einlesen
> printf("Bitte numerischen Schulnotenwert eingeben: ");
> scanf("%d",&nnote);
>
> switch (nnote)
> {
> case 1:
Bruce Cran wrote:
cpghost wrote:
There's a mismatch here: scanf("%d", ...) expects a pointer to int,
while &nnote is a pointer to a short. Normally, an int occupies more
bytes in memory than a short (typically sizeof(int) == 4 on 32bit
platforms, and sizeof(int) == 8 on 64bit platforms; while t
Am Dienstag, 23. Oktober 2007 23:24:09 schrieb Harald Schmalzbauer:
> #include
>
> void main()
> {
> short nnote;
>
> // Numerischen Notenwert einlesen
> printf("Bitte numerischen Schulnotenwert eingeben: ");
> scanf("%d",&nnote);
man 3 scanf (most important thing to look at with any such
On Tue, 23 Oct 2007 23:36:40 +0100
Bruce Cran <[EMAIL PROTECTED]> wrote:
> cpghost wrote:
>
> > There's a mismatch here: scanf("%d", ...) expects a pointer to int,
> > while &nnote is a pointer to a short. Normally, an int occupies more
> > bytes in memory than a short (typically sizeof(int) == 4
cpghost wrote:
There's a mismatch here: scanf("%d", ...) expects a pointer to int,
while &nnote is a pointer to a short. Normally, an int occupies more
bytes in memory than a short (typically sizeof(int) == 4 on 32bit
platforms, and sizeof(int) == 8 on 64bit platforms; while typically
sizeof(sho
Derek Ragona wrote:
At 04:24 PM 10/23/2007, Harald Schmalzbauer wrote:
Am Dienstag, 23. Oktober 2007 22:24:54 schrieb Bill Moran:
> In response to cpghost <[EMAIL PROTECTED]>:
> > On Tue, 23 Oct 2007 20:44:52 +0200
> >
> > Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
> > > The first one was fo
On Tue, 23 Oct 2007 23:24:09 +0200
Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
> #include
>
> void main()
> {
> short nnote;
^
> // Numerischen Notenwert einlesen
> printf("Bitte numerischen Schulnotenwert eingeben: ");
> scanf("%d",&nnote);
^
> I found that de
At 04:24 PM 10/23/2007, Harald Schmalzbauer wrote:
Am Dienstag, 23. Oktober 2007 22:24:54 schrieb Bill Moran:
> In response to cpghost <[EMAIL PROTECTED]>:
> > On Tue, 23 Oct 2007 20:44:52 +0200
> >
> > Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
> > > The first one was for example the attache
Am Dienstag, 23. Oktober 2007 23:24:09 schrieb Harald Schmalzbauer:
[*snip*]
> > Although, you'll have to include your code inline to get past the
> > sanitizers.
>
> Thanks all,
>
> here was my example, just for completeness, I found mentors for my needs.
>
> Thanks a lot to all!
>
>
> #include
>
Am Dienstag, 23. Oktober 2007 22:24:54 schrieb Bill Moran:
> In response to cpghost <[EMAIL PROTECTED]>:
> > On Tue, 23 Oct 2007 20:44:52 +0200
> >
> > Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
> > > The first one was for example the attached code: Why does it segfault?
> >
> > Mailman ate the
In response to cpghost <[EMAIL PROTECTED]>:
> On Tue, 23 Oct 2007 20:44:52 +0200
> Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
>
> > The first one was for example the attached code: Why does it segfault?
>
> Mailman ate the attachment... Can't see it here.
I may be out of line, but I think i
On Tue, 23 Oct 2007 20:44:52 +0200
Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
> The first one was for example the attached code: Why does it segfault?
Mailman ate the attachment... Can't see it here.
-cpghost.
--
Cordula's Web. http://www.cordula.ws/
___
Hello,
I'm abaout to learn C (really learn it, not just to be able to tinker arround
with).
So I bought a book which has some practices in each chapter.
Now I wrote the little programs and they were almost correct, but the things
going wrog aren't explained in that book.
Probably it has to do wi
23 matches
Mail list logo