Kind a roof error?

This is a discussion on Kind a roof error? within the C Programming forums, part of the General Programming Boards category; When I excute these codes.. I could get a not 2 bad result.. But if I select exception valuse, it ...

  1. #1
    Iz's_what?_4_u
    Guest

    Question Kind a roof error?

    When I excute these codes..
    I could get a not 2 bad result..
    But if I select exception valuse, it cause roof error.

    How can i solve this?
    Could answer me?

    I inspect these lines in /*~*/.

    #include <stdio.h>
    #include <stdlib.h>

    void print_f(void) {
    printf("Please select THE number between 1~7('7' to QUIt)\n");
    printf(" 1) Triangle Form_Nomal SHAPE\n");
    printf(" 2) Star Form\n");
    printf(" 3) Arrow Form\n");
    printf(" 0) QUIT\n");
    printf(" Wanna select ? ===> ");
    }

    int operate_f(int i){
    unsigned int err_count = 3;

    switch(i) {
    case 1:
    printf("\n");
    printf("\n");
    printf("\n");
    main();
    break;
    case 2:
    printf("١ڡ١ڡ١\n");
    printf("\n");
    printf("\n");
    main();
    break;
    case 3:
    printf("ס֡ء١\n");
    printf("\n");
    printf("\n");
    main();
    break;
    case 0:
    printf("Bye Bye!!\n");
    exit(i==7);
    break;
    /* default:
    printf("Worng number select number between 0~3\n");
    err_count--;
    if(err_count==0){ exit(0); }
    main();
    break;
    } */
    return 0;
    }

    int main(void) {
    int num;
    print_f();
    scanf("%d",&num);
    printf("\n");
    printf("\n");
    operate_f(num);
    return 0;
    }

    Waiting 4 your little effort....

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>select exception valuse,
    What do you mean by this?

    Please use code tags when posting code.

    Don't call main(), only the OS should be doing that. Use a for or while loop instead.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    124
    When i compiled it, it gave me 7 errors and 3 warnings.
    How did you run it?
    Loading.....
    ( Trying to be a good C Programmer )

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do you resolve this error?
    By -EquinoX- in forum C Programming
    Replies: 32
    Last Post: 11-05-2008, 03:35 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  4. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  5. UNICODE and GET_STATE
    By Registered in forum C++ Programming
    Replies: 1
    Last Post: 07-15-2002, 03:23 PM

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