how to remove the errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kariba
    New Member
    • Oct 2008
    • 1

    how to remove the errors

    #include <iostream.h>
    void double (int x, int y, int z)
    {
    x*=2; y*=2; z*=2; }
    int main ( )
    { int a=0, b=0, c=0;
    Cout<<“enter A, B C”;
    Cin>>a,b,c;
    double (x, y, z);
    cout << "x=" << x << ", y=" << y << ", z=" << z;
    return 0;
    }
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    What errors?

    You have included the the old non-standard iostream.h rather than iostream.
    You have not declared x, y or z in main.
    You pass the parameters to double by value so it has no effect on external variables.
    double is a keyword.

    Comment

    • ashishlohani1983
      New Member
      • Oct 2008
      • 1

      #3
      <Spoon-feeding code removed please read the posting guidelines - Banfa>


      Hope it helps

      Ashish
      Last edited by Banfa; Oct 22 '08, 01:34 PM. Reason: Removed Code

      Comment

      • boxfish
        Recognized Expert Contributor
        • Mar 2008
        • 469

        #4
        Adding to your list of crimes: :-)
        You capitalized cout and cin. C++ is case sensitive.
        You did not write
        using namespace std;
        at the beginning of your program.
        You gave a function a keyword name. Rename it.
        See if you can fix some of these errors. And while I'm at it, please use code tags around your code. Put [CODE] before it and [/CODE] after it so it shows up in a box with a monospace font and the indentation doesn't get wrecked. Thanks.
        Good luck.

        Comment

        • newb16
          Contributor
          • Jul 2008
          • 687

          #5
          Dear Sir/Madam
          would you please like to post the error message here _verbatim_ as well so those who are not on 1st guru level yet ( 2nd level - able to spot error in code without code itself ) can participate in discussion?
          Or, if error is incorrect program behaviour, what is expected and what is real output?

          Comment

          Working...