Thread: Expression/Declaration Syntax Errors

  1. #1
    Attack hamster fuh's Avatar
    Join Date
    Dec 2002
    Posts
    176

    Expression/Declaration Syntax Errors

    In my calc prog, I get errors. These errors:
    Code:
    C:\Borland\BCC55\zack>bcc32 -I..\include  -L..\lib calc
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    calc.cpp:
    Error E2188 calc.cpp 13: Expression syntax
    Error E2293 calc.cpp 55: ) expected
    Error E2141 calc.cpp 55: Declaration syntax error
    *** 3 errors in Compile ***
    for the attachment. Could anyone tell me what's wrong?

    P.S.:I'd like if someone could tell me what the things in subtraction are. Like:the difference.
    Thanks in advance
    Stupid things pop singers say

    "I get to go to lots of overseas places, like Canada."
    - Britney Spears

    "I love what you've done with the place!"
    -Jessica Simpson upon meeting the Secretary of Interior during tour of the White House

  2. #2
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Code:
    double subtract(int 111, int 222){
    		return 111-222;}
    	double mult(int 333, int 444){
    		return 333*444;}
    	double div(int 555, int 666){
    		return 555/666;}
    Variable names must begin with a character.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  3. #3
    Attack hamster fuh's Avatar
    Join Date
    Dec 2002
    Posts
    176
    I've got it now. Thanks, Sang-drax! Everyone can enjoy it! Source included.
    Stupid things pop singers say

    "I get to go to lots of overseas places, like Canada."
    - Britney Spears

    "I love what you've done with the place!"
    -Jessica Simpson upon meeting the Secretary of Interior during tour of the White House

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. errors syntax
    By bazzano in forum C Programming
    Replies: 2
    Last Post: 09-30-2005, 02:44 AM
  4. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM
  5. odd errors from msvc std library files
    By blight2c in forum C++ Programming
    Replies: 6
    Last Post: 04-30-2002, 12:06 AM