delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/10/04:19:57

From: mtessmann DOT NOUCE AT metronet DOT NOSPAM DOT de (Matthias Tessmann)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: what am I doing wrong.
Date: Mon, 09 Jun 1997 19:08:09 GMT
Organization: metronet Kommunikationsdienste GmbH & Co. KG, Germany
Lines: 33
Message-ID: <339af5d4.15089960@pop-news.metronet.de>
References: <3399c3e5 DOT 7015538 AT nbisrv DOT nbi DOT dk>
NNTP-Posting-Host: nuernberg2.pop.metronet.de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sat, 07 Jun 1997 21:06:00 GMT, kdor AT geocities DOT com (Kristian
Dorland) wrote:

#include<stdio.h>

>main()

/* This should rather be int main(void). */

>  {
>  int one == 1234;
/*             ^^^^
 == stands for a test of equality. You have to use = for assignment.*/

int one = 1234;

>  printf("%d",one);

return 0;
/* return default is int */
>  }

Hope this helps.

Nighthawk

-- 
*------- REMOVE .NOUCE and .NOSPAM to eMail me ----------*                                                        
*Artificial intelligence is better than natural stupidity*
*If something can go wrong, it will.                     *
*If something can _not_ go wrong, it will.               *
*If something went wrong, it will become even worse.     *                            
*---------------- PGP Public Key aviable ----------------*

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019