TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DANIEL MCGREGOR
from: FRANK MASINGILL
date: 1997-05-04 23:31:00
subject: Compiler error

    You said you were familiar with Hyman's book.
    I wonder if you can tell me why the following is giving me a specific 
error when compiling using Turbo C++ Version 3.0:
void main() {
---------------
---------------
    const int NumSizes = 3;
    const int NumTops = 5;
    const ChoiceDescription const Sizes[NumSizes] = {{"Small", 10}, 
{"Medium", 12}, {"Large", 14}};
    const ChoiceDescription const Tops[NumTops] = {{"Pepperoni",1.8},
        {"Sausage",2.1}, {"Onions", 0.5}, {"Extra Cheese",1.0},
        {"Olives", 0.7}};
  -------------------etc.
    On the two last "const" lines I am getting the error " 'const' has 
already been included in function main() "
    This is all that is preventing the compiling of this program.  I tried 
substituting a comma for the second "const" in each line but that only 
produced a multitude more errors.
    Hope you or somebody can help.
                            Sincerely,
                                            Frank
--- FMail/386 1.02
---------------
* Origin: Maybe in 5,000 years frankmas@juno.com (1:396/45.12)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.