File Opening?

This is a discussion on File Opening? within the C Programming forums, part of the General Programming Boards category; Hi. I am wondering how, if possible, to open a file in C programming. I don't mean to write to ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    13

    File Opening?

    Hi. I am wondering how, if possible, to open a file in C programming. I don't mean to write to like a TXT file, but just a simple program that when run opens a DIFFERENT .exe (or other) file on the computer's hard drive.

    Thanks.

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    it is possible to write to files other that type .txt in c - you don't need to learn anything new, just to have an idea of how the document handles text - i learned that i can write useful information to a microsoft excel file in the same way i write to a text file (using fprintf) - \n will move to the cell below the current cell position i am in, \t will write to the cell on the right of the current cell, and there are probably more ways of manipulating such documents if you're willing to experiment.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 08:35 AM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM

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