www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - someone plz help me

reply "John Doe" <chos worldpath.net> writes:
i get this  error when i try to compile this   can someone  tell me what i
have done rong
D:\apps\Burger_World.cpp:27: warning: initialization to `const int' from
`double'
D:\apps\Burger_World.cpp:28: warning: initialization to `const int' from
`double'
D:\apps\Burger_World.cpp:29: warning: initialization to `const int' from
`double'
D:\apps\Burger_World.cpp:30: warning: initialization to `const int' from
`double'
D:\apps\Burger_World.cpp:31: warning: initialization to `const int' from
`double'
D:\apps\Burger_World.cpp:32: warning: initialization to `const int' from
`double'

Execution terminated




/*
  Name:Burger World
  Copyright:2002- 2005
  Author:Lord Chos
  Date: 22/12/02 21:39
  Description:Order placer
*/


 #include <iostream.h>

 void main()
 {
  int choice1 = 0;
   int choice2 = 0;
    int choice3 = 0;
     int choice4 = 0;
      int choice5 = 0;
       int choice6 = 0;
        int choice7 = 0;
         int choice8 = 0;
          int choice9 = 0;
           int choice10 = 0;
            int choice11 = 0;
             int choice12 = 0;

 const int A1 = 2.99;
  const int B2 = 1.99;
   const int C3 = .59;
    const int D4 = .99;
     const int E5 = .59;
      const int F6 = .99;

 cout << "Welcom to burger world" << endl << endl;

 cout << "A1. Chease Burge's $2.99 each." << endl;
  cout << "B2. Burger no Chease $1.99 each." << endl;
    cout << "C3. Small Fries $.59" << endl;
      cout << "D4. Larg Fries $.99" << endl;
        cout << "E5. Small Drink $.59" << endl;
          cout << "F6. Larg Drink $.99" << endl;

 cout << "Enter the number  of your selection" << endl;
   cin >> choice1;


  }
Dec 23 2002
parent "John Doe" <chos worldpath.net> writes:
Never mind i got it   i most have been sleeping
"John Doe" <chos worldpath.net> wrote in message
news:au8mnv$154d$1 digitaldaemon.com...
 i get this  error when i try to compile this   can someone  tell me what i
 have done rong
 D:\apps\Burger_World.cpp:27: warning: initialization to `const int' from
 `double'
 D:\apps\Burger_World.cpp:28: warning: initialization to `const int' from
 `double'
 D:\apps\Burger_World.cpp:29: warning: initialization to `const int' from
 `double'
 D:\apps\Burger_World.cpp:30: warning: initialization to `const int' from
 `double'
 D:\apps\Burger_World.cpp:31: warning: initialization to `const int' from
 `double'
 D:\apps\Burger_World.cpp:32: warning: initialization to `const int' from
 `double'

 Execution terminated




 /*
   Name:Burger World
   Copyright:2002- 2005
   Author:Lord Chos
   Date: 22/12/02 21:39
   Description:Order placer
 */


  #include <iostream.h>

  void main()
  {
   int choice1 = 0;
    int choice2 = 0;
     int choice3 = 0;
      int choice4 = 0;
       int choice5 = 0;
        int choice6 = 0;
         int choice7 = 0;
          int choice8 = 0;
           int choice9 = 0;
            int choice10 = 0;
             int choice11 = 0;
              int choice12 = 0;

  const int A1 = 2.99;
   const int B2 = 1.99;
    const int C3 = .59;
     const int D4 = .99;
      const int E5 = .59;
       const int F6 = .99;

  cout << "Welcom to burger world" << endl << endl;

  cout << "A1. Chease Burge's $2.99 each." << endl;
   cout << "B2. Burger no Chease $1.99 each." << endl;
     cout << "C3. Small Fries $.59" << endl;
       cout << "D4. Larg Fries $.99" << endl;
         cout << "E5. Small Drink $.59" << endl;
           cout << "F6. Larg Drink $.99" << endl;

  cout << "Enter the number  of your selection" << endl;
    cin >> choice1;


   }
Dec 23 2002