Ok this might seem dumb...
Results 1 to 10 of 10

Thread: Ok this might seem dumb...

  1. #1
    Senior Member
    Join Date
    Aug 2002
    Posts
    239

    Ok this might seem dumb...

    What are files with the "*.c" extension? Whatever it is, is it like perl? Can I run the script on a Windows machine? Help me peez!
    It\'s 106 miles to Chicago, we\'ve got a full tank of gas, half a pack of cigarettes, it\'s dark and we\'re wearing sunglasses.

    Hit it!

  2. #2
    Senior Member
    Join Date
    Aug 2001
    Posts
    352
    sounds like they are likely to be something to do with c programming language, it could be an uncompiled file (dont quote me on this but c++ uses *.cpp for uncompiled files and im pretty sure c uses *.c for its uncompiled stuff)

    if anyone else thinks this isn't right, let me know so i can sort it out too

  3. #3
    All i know is uncompiled C is .c i think

  4. #4
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,324
    files with the extension .c are usually either c or c++. You can download a free compiler at Cygwin. This is the windows version of the GCC compiler found on many *nix boxes.

    You might also want to book the File Extension Source, which lists all the extensions and what they generally stand for.

    Hope this helps.
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  5. #5
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    and , you can't run it as a script, but it must be compiled
    with a c compiler into an exe file, as has been mentioned.

    You might want to find out which compiler the author
    intended the files to be compiled on, and what type of machine
    and OS was intended, because even though c is supposed to
    be portable between systems, it's never 100% portable
    in practice.
    I came in to the world with nothing. I still have most of it.

  6. #6
    Member
    Join Date
    Oct 2002
    Posts
    34
    the file that you have aka *.c is most likely a C/C++ written in Nix (guessing). If it was done in Visual C++ you'd have a whole bunch of files such as .cpp and .c so open up nix and use gcc to look at the code if you can.
    [gloworange]I pLaY mY eNeMyS lIkE a ChEsS.[/gloworange]

  7. #7
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,535
    you can get the gnu C compiler for any platform, also for the windows platform

    so go to http://www.gnu.org/software/gcc/gcc.html
    and start learning the wonderfull language of the C
    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 !

  8. #8
    Member
    Join Date
    Aug 2001
    Posts
    90
    Simply put, and .c file is a C program file. It contains the actual source code of whatever program you're trying to write. Like rcgreen said, it's not run as a script, but actually, you'll need to compile it using a C Compiler. I use the one from Borland on my Windows box. And if you're talking about *nix systems, then you always have 'gcc'.

    As a result of compilation, you'll end up with a .exe with the same name as the file ( in windows ), or a.out ( in *nix ) unless specified otherwise. It's this file that you will be looking to run.

    There we go.
    I blame you cos my mind is not my own, so don't blame me if I trespass in your zone!

  9. #9
    Junior Member
    Join Date
    Oct 2002
    Posts
    7
    Definatly make sure you know what OS it was ment for coz it's very likely you'll run into problems if you try compile a *nix program on windows or vice versa.

    also check that you have any nessesary header files (e.g foobar.h) they will be writen in at the top of the c file.

    other than that i cant think of any other problems so have fun compliing
    Eagles may soar.... But weasles don\'t get sucked into jet engines

  10. #10
    Junior Member
    Join Date
    Oct 2002
    Posts
    7
    Definatly make sure you know what OS it was ment for coz it's very likely you'll run into problems if you try compile a *nix program on windows or vice versa.

    also check that you have any nessesary header files (e.g foobar.h) they will be writen in at the top of the c file.

    other than that i cant think of any other problems so have fun compliing
    Eagles may soar.... But weasles don\'t get sucked into jet engines

Posting Permissions

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