Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Running code Separately

Reply
Thread Tools

Running code Separately

 
 
HELLO $$$
Guest
Posts: n/a
 
      11-16-2006
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();

}

}

}


 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      11-16-2006
* 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?
 
Reply With Quote
 
 
 
 
HELLO $$$
Guest
Posts: n/a
 
      11-16-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>* 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?



 
Reply With Quote
 
Gianni Mariani
Guest
Posts: n/a
 
      11-16-2006
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.
 
Reply With Quote
 
Markus Moll
Guest
Posts: n/a
 
      11-16-2006
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


 
Reply With Quote
 
Howard
Guest
Posts: n/a
 
      11-16-2006

"HELLO $$$" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
Gianni Mariani
Guest
Posts: n/a
 
      11-17-2006
Howard wrote:
> "HELLO $$$" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Will a user ever download a .manifest file separately? Ken Spreitzer ASP .Net 2 02-12-2006 09:49 PM
Reading stdout and stderr separately ladygrinningsoul Perl 3 04-25-2005 04:25 PM
CSS Menu code - can I store it separately? Brian HTML 5 01-19-2005 08:01 AM
How can I create a separately scrollable area? JezB ASP .Net 3 07-02-2004 06:31 PM
how to add aspx and the class file separately in VS.NET? BH ASP .Net 4 07-30-2003 09:43 PM



Advertisments