Thread: debug

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    2

    debug

    Thanks for taking the trouble...
    Last edited by galaxy; 05-01-2003 at 05:30 AM.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    You have several syntax errors, like you never declare i or have misplaced parantheses. Did your computer crash for that? lol!
    And use code tags next time. It is easier to spot errors with a nice indentation.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Most, if not all of your variables should be floats or doubles:
    Code:
    //int i,t,t0,T,num_harmonic,omega,integrand1,integrand2,
    int i,t,t0,num_harmonic,a,b;
    //T=20;
    double val;
    double T=20;
    t0=5;
    num_harmonic=5;
    //omega=2*3.14/T;
    //integrand1=0;
    //integrand2=0;
    double omega=2*3.14/T;
    double integrand1=0;
    double integrand2=0;
    
    //for(i=1;i<num_harmonic+1;i=i++)
    To increment i, use:
    for(i=1;i<num_harmonic+1;i++)
    
       //for(t=1;t<5;t=t++)
    To increment t, use:
       for(t=1;t<5;t++)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary not built with debug info - why?
    By ulillillia in forum C Programming
    Replies: 15
    Last Post: 12-11-2008, 01:37 AM
  2. makefiles - debug & release?
    By cpjust in forum C Programming
    Replies: 6
    Last Post: 10-26-2007, 04:00 PM
  3. Debug --> Exceptions in Visual Studio 2005
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 08-10-2007, 02:12 AM
  4. Results in Debug and Release mode are different
    By jaro in forum C Programming
    Replies: 11
    Last Post: 05-27-2006, 11:08 AM
  5. Ask about Debug Assert Failed
    By ooosawaddee3 in forum C++ Programming
    Replies: 0
    Last Post: 04-24-2002, 11:07 PM