www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/19/01:02:17

From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: I need HELP!
Date: 19 Feb 1997 01:03:54 GMT
Organization: Oxford University
Lines: 32
Message-ID: <5edjhq$pi5@news.ox.ac.uk>
References: <856304344snz AT jambuck DOT demon DOT co DOT uk>
NNTP-Posting-Host: mc31.merton.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

James Buckingham (James AT jambuck DOT demon DOT co DOT uk) wrote:

: unsigned char *video_buffer =
: 	(unsigned char *) (__djgpp_conventional_base + 0xA000000);

: in the code file.

Declare:

unsigned char *video_buffer;

at top level, then put somewhere in the initialisation:

video_buffer=(unsinged char *) (__djgpp_conventional_base() + 0xa0000);

: It keeps giving me the message:
: 	initializer element is not constant

: Could someone tell me how to sort this, or at least translate the error
: message into english for me.

It is English :) It means that when you're setting up an initial value
for a variable, e.g.

int a=3;

the value must be a constant which can be evaluated at compile-time.
__djgpp_conventional_base isn't constant.

-- 
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.

- Raw text -


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