Help with C
Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Help with C

  1. #1
    Member
    Join Date
    Apr 2002
    Posts
    88

    Help with C

    I am just getting started with C and have been doing some basic programs and such when today, we I tried to make a program expermenting with the float data type, I would get a error in debug referring to the header.

    c:\program files\microsoft visual studio\teststido\teststido.cpp(12) : f
    cruiouse, and unable to solve the problem, I tried other programs that included "printf" and the header stdio.h and all of the programs returned the same error on debug. Even code as simple as:

    #include <stdio.h>

    main()
    {
    printf ("lala.\n");
    return ();
    }

    returns that error, I could use any help, thanks ^ ^

    -Radiator52
    WWJD
    What Would Jesus Do (For a klondike Bar?)

  2. #2
    Member
    Join Date
    Apr 2002
    Posts
    88
    Sorry.. the error message read:

    c:\program files\microsoft visual studio\teststido\teststido.cpp(12) : fatal error C1010: unexpected end of file while looking for precompiled header directive
    WWJD
    What Would Jesus Do (For a klondike Bar?)

  3. #3
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    it's

    return 0;

    not ();
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  4. #4
    Member
    Join Date
    Apr 2002
    Posts
    88
    Oh right, that was just a typo in the code, I still get the error message
    WWJD
    What Would Jesus Do (For a klondike Bar?)

  5. #5
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    other possibility:

    <stdio.h> is for c not c++ (cpp)

    <iostream.h> is for c++

    then it'd be

    cout << "lala\n"
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  6. #6
    Member
    Join Date
    Apr 2002
    Posts
    88
    stdio.h used to work, now it suddenly just stoped working..and it says to use stdio.h in the manual i have
    hm...
    WWJD
    What Would Jesus Do (For a klondike Bar?)

  7. #7
    Senior Member
    Join Date
    Sep 2001
    Posts
    138
    stdio.h is still aval in C++, and is probably not the problem. On the other hand you seem to have made the problem a LOT of new programmers make. Try your program like this, then compare it with what you had...>
    Code:
    #include <stdio.h>
    
    int main(void) {
    
    	printf("Lala!\n");
    	return 0;
    
    }
    http://www25.brinkster.com/cheeseball

    -- Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment--

  8. #8
    Senior Member
    Join Date
    Sep 2001
    Posts
    138
    and I tested my code on Borland C++ 5.5.1 for Win32, Just thought I would mention this...
    http://www25.brinkster.com/cheeseball

    -- Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment--

  9. #9
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    how about:

    int main(void)
    {
    //ur code here
    }
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  10. #10
    Member
    Join Date
    Apr 2002
    Posts
    88
    Still nothing.. I thought maby stdio.h header file was deleated so I ran a search.. 3 found = \

    <stdio.h> is for c not c++ (cpp)
    C is what im trying to learn, not c++, incase there was a mis-communication
    WWJD
    What Would Jesus Do (For a klondike Bar?)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •