delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/13/02:33:30

From: "A. Sinan Unur" <sinan DOT unur AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Mode 13h
Date: Mon, 12 Jan 1998 18:22:09 -0500
Organization: Cornell University (http://www.cornell.edu/)
Lines: 28
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <34BAA5A1.7B6688DE@cornell.edu>
References: <34B7ED43 DOT B7414073 AT cornell DOT edu> <19980112231500 DOT SAA07735 AT ladder01 DOT news DOT aol DOT com>
NNTP-Posting-Host: cu-dialup-0013.cit.cornell.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

HackerOC3 wrote:
> 
> could you please help me with this code?  I keep  getting parse errors 
> before int:
> 
> printf("y value?");
> int y;
> scanf(" %d", &y);
> printf("color value?");
> int c;
> scanf(" %d", &c);

C is not C++; you cannot declare variables like this. instead, do:

int y,c;
printf("y value?");
scanf(" %d", &y);
printf("color value?");
scanf(" %d", &c);

-- 
----------------------------------------------------------------------
A. Sinan Unur
Department of Policy Analysis and Management, College of Human Ecology,
Cornell University, Ithaca, NY 14853, USA

mailto:sinan DOT unur AT cornell DOT edu
http://www.people.cornell.edu/pages/asu1/

- Raw text -


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