Thread: Help! Need to write a 'notepad' program..

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    41

    Question Help! Need to write a 'notepad' program..

    I'm working on NFinity a indepent OS with someone else doing the ASM part, right now my task is to write a notepad-like (in a terminal) program.

    Firstly, I need to know if you can put variables in fopen(); like:

    fopen("%s.txt", "w", file_name);

    If not, I have to write my own file I/O function and I'll be needing alot of help on that.

    THX in advence,
    CKarl
    THERE IS NO PLACE LIKE 127.0.0.1

  2. #2
    Registered User
    Join Date
    Jul 2003
    Posts
    102

    Smile Suggestions

    Hi,
    fopen accepts only two parameters. Can you explain why you need %s.txt and 3 parameters. If you give more input regarding your question we can discuss on that and we can find solution.
    Saravanan.T.S.
    Beginner.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    There is far more to notepad than meets the eye. Unless the OS is rather well developed you might be a bit ahead of yourself. Windows has one of the most robust text rendering systems I've ever seen and it is extremely detailed and complex.

    Is this for text mode GUI or graphics? Also what API calls are you going to make to the OS? Writing a notepad from a DOS-like OS would not be a problem, but writing a notepad type app would be unless the OS was near completion as well as its API.

    Notepad also employs COM technology which I doubt that your OS supports. Although you could write your own version of COM, I highly doubt that this has been done in your case.

    More info.

    As well go to www.flashdaddee.com and look at the OS board.

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    41
    I'm making it for a DOS-like OS (it might grow up to being gfx API's), and it's not useing COM.

    And I'm asking these questions becuz' I needed to know how to program the file I/O. And Salem answered my question.
    THERE IS NO PLACE LIKE 127.0.0.1

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie needs help..
    By xpress urself in forum C++ Programming
    Replies: 3
    Last Post: 07-26-2007, 07:22 PM
  2. how could i write this program: cat < apa | wc | wc > bepa
    By strugglingman in forum C Programming
    Replies: 2
    Last Post: 04-26-2006, 04:40 PM
  3. Hints to write a program
    By Bnchs400 in forum C++ Programming
    Replies: 28
    Last Post: 04-05-2006, 05:35 AM
  4. Replies: 1
    Last Post: 10-13-2004, 12:15 PM
  5. Challenge to write a program
    By Twisted.alice in forum A Brief History of Cprogramming.com
    Replies: 40
    Last Post: 05-15-2003, 12:00 PM