.exe files...

Discussion in 'C++' started by Services of TKO, Aug 2, 2004.

  1. Can i open each *.exe file in C++?

    Greetings Services of TKO
     
    Services of TKO, Aug 2, 2004
    #1
    1. Advertising

  2. Services of TKO

    JKop Guest

    Services of TKO posted:

    > Can i open each *.exe file in C++?
    >
    > Greetings Services of TKO
    >
    >
    >


    Yes, just as you can open each bag in a radiator.

    If you have any intelligible questions, in which the
    selection of nouns you use actually make sense, then by
    all means ask them.


    -JKop
     
    JKop, Aug 2, 2004
    #2
    1. Advertising

  3. "Services of TKO" <> wrote in message
    news:8UuPc.130$...
    > Can i open each *.exe file in C++?


    If you mean dive into the code by opening the *.exe file in your editor,
    then no. The only file types modifiable by C++ are the following types:

    Source file: *.cpp (C++ code), *.c (C code)
    Header file: *.h, *.hpp, *.hxx (not sure that last one's right)

    I think I'm missing a couple, but oh well. If you've created a program and
    you build it from the source/header files, you can run the program, but I'm
    not sure that's what you're looking for since you can just run any program
    by double-clicking on it.

    I think you probably need to check out some web resources like
    cplusplus.com, because I'm not sure you know what C++ is at this point.
    Also, you should probably read the comp.lang.c++ FAQ at
    www.parashift.com/c -faq-lite/
    Good luck getting started at C++!

    //mike tyndall
     
    Stephen Tyndall, Aug 2, 2004
    #3
  4. Services of TKO wrote:
    > Can i open each *.exe file in C++?


    What do you mean by that? Files (whether with 'exe' extension
    or with any other) can be open/read/written to/closed by means
    of 'fstream' family of classes. So, generally speaking, the
    answer to your [very unclear] question is "yes, it is generally
    possible".

    Victor
     
    Victor Bazarov, Aug 2, 2004
    #4
  5. Services of TKO wrote:
    > Can i open each *.exe file in C++?


    Yes, if you have read access to the file:

    #include <fstream>
    ....
    std::ifstream exe( "c:\\winnt\\notepad.exe",
    std::ios::in|std::ios::binary );



    But I feel, that this is not, what you asked for. So let me guess:

    Did you mean "execute", when you said "open"?

    Then, yes again:

    #include <cstdlib>
    ....
    system( "c:\\winnt\\notepad.exe" );

    This is a standard C function, but the effects are system dependent
    (even among various MS-flavors).



    Or did you mean sort of "integrate the executable into your favourite
    C++ Programming Environment"?

    Then, you should ask in a newsgroup designated to your IDE (Borland,
    MSVC++, Eclipse?).


    Ralph
     
    Ralph D. Ungermann, Aug 2, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Namratha Shah \(Nasha\)
    Replies:
    0
    Views:
    4,774
    Namratha Shah \(Nasha\)
    Nov 5, 2004
  2. Chitra

    ASPnet_wp.exe and CSRSS.exe

    Chitra, Nov 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    459
    Chitra
    Nov 7, 2003
  3. Id L
    Replies:
    2
    Views:
    4,823
    mikeb
    Mar 3, 2004
  4. Dave
    Replies:
    1
    Views:
    452
    =?Utf-8?B?SGVybWl0IERhdmU=?=
    Jan 30, 2006
  5. Replies:
    4
    Views:
    443
    Andrew Thompson
    Dec 4, 2006
Loading...

Share This Page