Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   C (https://www.askmehelpdesk.com/forumdisplay.php?f=438)
-   -   Need cpp program debugging help (https://www.askmehelpdesk.com/showthread.php?t=27329)

  • Jun 6, 2006, 04:21 AM
    Kermit1941
    need cpp program debugging help
    The following program

    #include <stdio.h>
    #include <iostream>
    #define TRUE 1 /* Define some handy constants */
    #define FALSE 0 /* Define some handy constants */
    ifstream f("CMT_MCAID",ios_base::binary);
    ofstream g("mcaid.txt",ios_base::app);
    char ch
    int k
    int kh,kl
    int limit
    limit = 1000

    for (int I=1;i<= limit;i++)

    {
    f >> ch;
    k = ch;
    kl = k%16;
    kh = (k -kl)/16;
    g << kh," ",kl," ";
    }

    received the following diagnostics

    med.cpp(5,3): Declaration syntax error
    med.cpp(6,11): Declaration syntax error
    med.cpp(8,4): Declaration syntax error
    med.cpp(13,17): Declaration syntax error
    med.cpp(13,17): Multiple declarations for 'i'
    med.cpp(13,17): Earlier declaration for 'i'
    med.cpp(13,17): Declaration syntax error

  • All times are GMT -7. The time now is 06:22 AM.