Running code Separately

H

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();

}

}

}
 
A

Alf P. Steinbach

* 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!".
 
H

HELLO $$$

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 said:
* 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?
 
G

Gianni Mariani

HELLO said:
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.
 
M

Markus Moll

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
 
H

Howard

HELLO $$$ said:
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
 
G

Gianni Mariani

Howard said:
"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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top