Like Tree1Likes
  • 1 Post By vart

How to load/run file

This is a discussion on How to load/run file within the C++ Programming forums, part of the General Programming Boards category; Let's say I create a small program or just want to open any kind of file on my computer, but ...

  1. #1
    Registered User Inkinsarto's Avatar
    Join Date
    Apr 2013

    How to load/run file

    Let's say I create a small program or just want to open any kind of file on my computer, but I want to run a program that forces the user to enter a password or something (I already know this part). How does one create the code that would open the file?

  2. #2
    Registered User
    Join Date
    Oct 2006
    what type of file do you want to open? what do you want to do with it once it's open? what have you tried so far?
    namespace life
        const bool change = true;

  3. #3
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    rogster001 likes this.
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  4. #4
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Liverpool UK
    open any kind of file on my computer
    You understand that a lot of the output file types on your computer are opened by application specific code? That is to say you wont just be able to open a file stream and output a pdf document for example - you need code/ suitable context to view that kind of content, unles you just want to see a load of jumbled symbols.
    Last edited by rogster001; 09-26-2013 at 12:18 PM.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  5. #5
    Registered User Inkinsarto's Avatar
    Join Date
    Apr 2013
    Would there be a specific code to use for any executable file. I mean this in the sense of something like, Minecraft. Let us say that you want to have a code that when someone clicks a file to play Minecraft, a box is displayed that forces the user to enter a password to be given permission for the file to be opened. What kind of code would be written to load that kind of file?

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    You would need to write some driver or some DLL that uses "grey" methods for intercepting this kind of thing. I wouldn't recommend it. Why you can't you just use an existing solution out there (ie program)? TrueCrypt?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. load file to structure
    By nynicue in forum C Programming
    Replies: 18
    Last Post: 08-06-2009, 04:41 PM
  2. Load font from *.ttf file
    By Born_2B_Alone in forum Windows Programming
    Replies: 1
    Last Post: 12-04-2004, 03:45 PM
  3. Load BMP from file func
    By Death_Wraith in forum C++ Programming
    Replies: 2
    Last Post: 09-20-2004, 06:46 PM
  4. how to load file in C#
    By SuperNewbie in forum C# Programming
    Replies: 1
    Last Post: 07-04-2002, 04:41 AM
  5. How do you Load a Header file?
    By opengl15 in forum C Programming
    Replies: 6
    Last Post: 03-27-2002, 08:26 PM

Tags for this Thread

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