Help with an error I can't figure out

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chickendude
    Away from Computer
    FFR Simfile Author
    • Sep 2003
    • 1901

    #1

    Help with an error I can't figure out

    Here's my code:


    #define MAX 50
    #define POWERS 7
    main()
    {
    char input[MAX];
    Term values[POWERS+1], temp;
    int loc=0, i=0, j, k, best;
    FILE* fp;

    printf("test before");
    scanf("%s",input);
    printf("test after");
    ...


    The program compiles, but I get a segmentation fault error on runtime
    the test print before the input scan appears before the error, but the one after doesn't

    it doesn't appear to be the syntax
  • Vests
    FFR Player
    • Jun 2006
    • 56

    #2
    Re: Help with an error I can't figure out

    What language is it in? I'm only self taught, in ASM, Auto It, Basic, and Java =\.
    In due time once all modern architecture is gone it will be called ancient. Because no matter how hard we work to perfect something, as time will progresses we shall dwell upon how imperfect it really was.

    Intelligence is only a value if you harness it.

    Comment

    • Squeek
      let it snow~
      • Jan 2004
      • 14444

      #3
      Re: Help with an error I can't figure out

      It's C++.

      Meaning I got nothing =/

      Googled the error?

      Comment

      • Vests
        FFR Player
        • Jun 2006
        • 56

        #4
        Re: Help with an error I can't figure out

        So if it isn't the syntax... what compiler are you using?
        In due time once all modern architecture is gone it will be called ancient. Because no matter how hard we work to perfect something, as time will progresses we shall dwell upon how imperfect it really was.

        Intelligence is only a value if you harness it.

        Comment

        Working...