Thread: Program that loads a txt file and rewrites it?

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    3

    Program that loads a txt file and rewrites it?

    Well, i have tried for days to make one but I simply can't make it work.
    I need a program that loads/reads a txt (max 500 characters or something) and then hooks to the keyboard (which is a standard one) and retypes all known letters (A-Z, a-z, 0-1, special signs like comma and ()) quickly.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Why do you want to do this?
    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

  3. #3
    Registered User
    Join Date
    Aug 2012
    Posts
    3
    Quote Originally Posted by laserlight View Post
    Why do you want to do this?
    I have a code written in a txt file and i need to retype it into an application which apparently doesn't support copy/paste (an emulated MS-Dos program)

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    You should be able to use input re-direction at the command prompt, e.g.,
    Code:
    application < input.txt
    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

  5. #5
    Registered User
    Join Date
    Aug 2012
    Posts
    3
    Quote Originally Posted by laserlight View Post
    You should be able to use input re-direction at the command prompt, e.g.,
    Code:
    application < input.txt
    Yes, i thought of that but the problem is that the txt file is on the machine itself and the application is in a virtual machine (oracle virtual machine) which is like an OS inside my OS

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Spavid04
    Yes, i thought of that but the problem is that the txt file is on the machine itself and the application is in a virtual machine (oracle virtual machine) which is like an OS inside my OS
    Then copy the text file to the virtual machine. You don't need to write a C++ program to do that.
    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

Similar Threads

  1. loads of linker errors, and I only tried to clean up D:
    By Akkernight in forum C++ Programming
    Replies: 6
    Last Post: 02-23-2009, 12:15 PM
  2. Replies: 5
    Last Post: 04-09-2008, 01:36 PM
  3. Bitmap loads OK, but not from resource
    By knutso in forum Windows Programming
    Replies: 6
    Last Post: 10-13-2003, 11:05 AM
  4. No image link loads
    By extrix in forum Tech Board
    Replies: 5
    Last Post: 04-06-2003, 02:34 PM
  5. Program that loads the .exe?
    By Sebastiani in forum C Programming
    Replies: 4
    Last Post: 07-26-2002, 01:00 PM