Running code Separately

Discussion in 'C++' started by HELLO $$$, Nov 16, 2006.

  1. HELLO  $$$

    HELLO $$$ Guest

    Hello every body.

    This 's a simple code written by " C# ". It can run alone away from its
    mother program (V.Studio 2005). So we can make acopy on any disk to be run.

    Can any body do the same by using " C++ " Language??

    Thank you.

    +++++++++++++++++++++++++++++++++++++++++++++

    using System;

    using System.Collections.Generic;

    using System.Text;

    namespace KEEMO_

    {

    class Program

    {

    static void Main(string[] args)

    {

    Console.WriteLine("Hello World");

    Console.ReadKey();

    }

    }

    }
     
    HELLO $$$, Nov 16, 2006
    #1
    1. Advertising

  2. * HELLO $$$:
    > Hello every body.
    >
    > This 's a simple code written by " C# ". It can run alone away from its
    > mother program (V.Studio 2005). So we can make acopy on any disk to be run.
    >
    > Can any body do the same by using " C++ " Language??
    >
    > Thank you.
    >
    > +++++++++++++++++++++++++++++++++++++++++++++
    >
    > using System;
    > using System.Collections.Generic;
    > using System.Text;
    >
    > namespace KEEMO_
    > {
    > class Program
    > {
    > static void Main(string[] args)
    > {
    > Console.WriteLine("Hello World");
    > Console.ReadKey();
    > }
    > }
    > }


    Yes, but not in completely portable C++, because the standard library
    doesn't include an equivalent for .NET Console.ReadKey.

    However, reading in a line serves the same purpose, and besides there's
    no point in bothering the user that way.

    For "Hello, world!" programs expressed in various languages, see the
    Wikipedia page on "Hello, world!".

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
     
    Alf P. Steinbach, Nov 16, 2006
    #2
    1. Advertising

  3. HELLO  $$$

    HELLO $$$ Guest

    The aim of my question is How do you operate any program (not necessary"
    Hello World ") and see its output away from its mother program (Vis. Studio
    2005 ) and using C++ ????!!!
    ====================================
    "Alf P. Steinbach" <> wrote in message
    news:...
    >* HELLO $$$:
    >> Hello every body.
    >>
    >> This 's a simple code written by " C# ". It can run alone away from its
    >> mother program (V.Studio 2005). So we can make acopy on any disk to be
    >> run.
    >>
    >> Can any body do the same by using " C++ " Language??
    >>
    >> Thank you.
    >>
    >> +++++++++++++++++++++++++++++++++++++++++++++
    >>
    >> using System;
    >> using System.Collections.Generic;
    >> using System.Text;
    >>
    >> namespace KEEMO_
    >> {
    >> class Program
    >> {
    >> static void Main(string[] args)
    >> {
    >> Console.WriteLine("Hello World");
    >> Console.ReadKey();
    >> }
    >> }
    >> }

    >
    > Yes, but not in completely portable C++, because the standard library
    > doesn't include an equivalent for .NET Console.ReadKey.
    >
    > However, reading in a line serves the same purpose, and besides there's no
    > point in bothering the user that way.
    >
    > For "Hello, world!" programs expressed in various languages, see the
    > Wikipedia page on "Hello, world!".
    >
    > --
    > A: Because it messes up the order in which people normally read text.
    > Q: Why is it such a bad thing?
    > A: Top-posting.
    > Q: What is the most annoying thing on usenet and in e-mail?
     
    HELLO $$$, Nov 16, 2006
    #3
  4. HELLO $$$ wrote:
    > Hello every body.
    >
    > This 's a simple code written by " C# ". It can run alone away from its
    > mother program (V.Studio 2005). So we can make acopy on any disk to be run.
    >
    > Can any body do the same by using " C++ " Language??


    Yes. You would need to use the build options that would not use
    libraries that come only with the development environment. In this
    case, (VC++) you need to build a "Release" version and limit any use of
    libraries that are not on your target machine. This could mean
    "statically" linking the C++ runtime for example.
     
    Gianni Mariani, Nov 16, 2006
    #4
  5. HELLO  $$$

    Markus Moll Guest

    Hi

    HELLO $$$ wrote:
    ^^^^^^^^^^ huh?

    > The aim of my question is How do you operate any program (not necessary"
    > Hello World ") and see its output away from its mother program (Vis.
    > Studio 2005 ) and using C++ ????!!!


    I don't know where you've learnt that strange concept of a mother program.
    There is no such thing as a "mother program", Visual Studio is just an IDE.
    Therefore, your question makes no sense.

    Markus
     
    Markus Moll, Nov 16, 2006
    #5
  6. HELLO  $$$

    Howard Guest

    "HELLO $$$" <> wrote in message
    news:...
    > Hello every body.
    >
    > This 's a simple code written by " C# ". It can run alone away from its
    > mother program (V.Studio 2005). So we can make acopy on any disk to be
    > run.
    >
    > Can any body do the same by using " C++ " Language??
    >


    "Mother program"? You mean the IDE (integrated developement environment)?

    Every program I've ever written in C++ runs without the IDE. (Except those
    which failed to compile, naturally. :)) I just compile it, and copy the
    resulting application file wherever I want. Are you having a problem doing
    that?

    -Howard
     
    Howard, Nov 16, 2006
    #6
  7. Howard wrote:
    > "HELLO $$$" <> wrote in message
    > news:...
    >> Hello every body.
    >>
    >> This 's a simple code written by " C# ". It can run alone away from its
    >> mother program (V.Studio 2005). So we can make acopy on any disk to be
    >> run.
    >>
    >> Can any body do the same by using " C++ " Language??
    >>

    >
    > "Mother program"? You mean the IDE (integrated developement environment)?
    >
    > Every program I've ever written in C++ runs without the IDE. (Except those
    > which failed to compile, naturally. :)) I just compile it, and copy the
    > resulting application file wherever I want. Are you having a problem doing
    > that?


    The microsoft IDE comes with libraries that may not necessarily be
    installed on your target machine .... sigh ... I like *nix. One
    compiled it usually runs everywhere although I have to admit there have
    been times where I have found incompatible libraries.
     
    Gianni Mariani, Nov 17, 2006
    #7
    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. ladygrinningsoul

    Reading stdout and stderr separately

    ladygrinningsoul, Nov 18, 2004, in forum: Perl
    Replies:
    3
    Views:
    1,054
    Alexey A. Kiritchun
    Apr 25, 2005
  2. BH
    Replies:
    4
    Views:
    1,126
  3. JezB
    Replies:
    3
    Views:
    385
  4. Ken Spreitzer
    Replies:
    2
    Views:
    539
    Ken Spreitzer
    Feb 12, 2006
  5. Brian
    Replies:
    5
    Views:
    506
    Bernhard Sturm
    Jan 19, 2005
Loading...

Share This Page