Problems With Declaring Identifiers

This is a discussion on Problems With Declaring Identifiers within the C++ Programming forums, part of the General Programming Boards category; I'm trying to declare these variables {double int1, int2;} along with two others sharing the same situation. When I try ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    1

    Angry Problems With Declaring Identifiers

    I'm trying to declare these variables {double int1, int2;} along with two others sharing the same situation. When I try to use functions that call upon those variables, it picks up int1 but not int2. Int1 and int2 were both cin'd correctly, as I was merely modifying a different program. When the function definer// double Integers( double int1, int2 ) // is accessed, the debugger states that there is a syntax error and an undeclared variable error. They both have to deal with int2. Would anyone happen to know why this is happening, or would someone need more information to answer that? Thanks.

    Ross Schalmo

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Is this in a function parameter list?:
    Code:
    double func ( double one, two );
    If so it will not work, you need to specify the type of both parameters:
    Code:
    double func ( double one, double two );
    Otherwise, I have no idea what you're asking.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Declaring the 'row' for my matrix - problems
    By qwertysingh in forum C Programming
    Replies: 3
    Last Post: 04-14-2009, 01:12 PM
  2. Common Problems
    By WolfPack in forum C Programming
    Replies: 4
    Last Post: 01-28-2003, 05:38 PM
  3. tile colliision detection problems
    By werdy666 in forum Game Programming
    Replies: 1
    Last Post: 10-23-2002, 09:26 PM
  4. UNICODE and GET_STATE
    By Registered in forum C++ Programming
    Replies: 1
    Last Post: 07-15-2002, 03:23 PM
  5. Coding Problems
    By RpiMatty in forum C++ Programming
    Replies: 12
    Last Post: 01-06-2002, 01:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21