Thread: Help; Help: Help!

  1. #1
    Registered User
    Join Date
    Jun 2021
    Posts
    1

    Help; Help: Help!

    I need a program that would read a list of emails from notepad and insert "," after each email. Then write the result to another new file.
    Any suggestions with code?
    I have no programming experience in C.

    Any help would be appreciated.
    Thanks

  2. #2
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,101
    Quote Originally Posted by dee111 View Post
    I need a program that would read a list of emails from notepad and insert "," after each email. Then write the result to another new file.
    Any suggestions with code?
    I have no programming experience in C.

    Any help would be appreciated.
    Thanks
    Then you should not be attempting to write this in C, or to get someone to program it for you for free!

    We are here to advise a programmer familiar with C, to identify the errors in their code, and offer advise to make the program better.

    We cannot and will not write the code for you or anyone else.

    You could always hire a programmer, to write the code for you, but not here.

    We also don't know the format of the original file.

  3. #3
    Registered User
    Join Date
    Sep 2020
    Posts
    150
    We also don't know the format of the original file.
    There might be no input file. The emails could be inside a running instance of Notepad.

  4. #4
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,101
    Then this has nothing to do with C Programming.

    In Windows:

    1) Open the file to read in one Notepad Window.

    2) Open a second window of Notepad, with a new file, or an existing file.

    3) Use your mouse to copy the text from the fist window.

    4) Paste the text into the second window.

    5) Format as you want in the second window.

    6) Close both the files.

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    ... the sky is falling!

    rstanley's point in post #4 sounds right to me, but admittedly if the list of emails is large, "format as you want" could get very tedious, and would be a good candidate for a programmatic solution. Instead of learning programming though, it may suffice to learn regular expressions (regex) and use a text editor that supports bulk search and replace using regex.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Tags for this Thread