what is wrong?

This is a discussion on what is wrong? within the C++ Programming forums, part of the General Programming Boards category; hey! I dont see what is wrong in this source! The error message is expected `;' before "t" . I ...

  1. #1
    Registered User stuart_cpp's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Posts
    31

    what is wrong?

    hey! I dont see what is wrong in this source! The error message is expected `;' before "t" . I tryed doing that but didn't work! Please correct it!
    Code:
    #include <iostream>
    #include <cmath>
    using namespace std;
    
    #define cls          (cout << "\003[2J")
    #define locate(z,s)  (cout <<"\003["<< z << ';' << (s) <<'H')
    #define dot(x,y)     (locate(y,x) << '*')
    
    #define pi  3.1416
    #define mx  40
    #define my  12
    #define a   25
    #define b   10
    
    int main()
    {
        int x, y;
        
        cls;
        
        for( double t = 0.0 ; t <= pi/2  t += 0.03)
        {
             x = (int) (A * cos(t) + 0.5);
             y = (int) (B * sin(t) + 0.5);
             DOT( x+Mx, y+My);
             DOT( x+Mx,-y+My);
             DOT(-x_Mx, y+My);
             DOT(-x+Mx,-y+My);
             }
             LOCATE(24, 0);
             char c;
             cin>>c;
             return 0;
    }

  2. #2
    Registered User
    Join Date
    Jul 2005
    Posts
    14
    Code:
    for( double t = 0.0 ; t <= pi/2;  t += 0.03)

  3. #3
    Registered User stuart_cpp's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Posts
    31
    cheers m8!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 07-15-2004, 03:30 PM
  2. Debugging-Looking in the wrong places
    By JaWiB in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-03-2003, 09:50 PM
  3. Confused: What is wrong with void??
    By Machewy in forum C++ Programming
    Replies: 19
    Last Post: 04-15-2003, 12:40 PM
  4. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 11:01 AM
  5. Whats wrong?
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 07-14-2002, 01:04 PM

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