473,382 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Running code Separately

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

}

}

}
Nov 16 '06 #1
6 1252
* 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?
Nov 16 '06 #2
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" <al***@start.nowrote in message
news:4s************@mid.individual.net...
>* 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?

Nov 16 '06 #3
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.
Nov 16 '06 #4
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
Nov 16 '06 #5

"HELLO $$$" <fa***@alphalink.com.auwrote in message
news:45********@news.chariot.net.au...
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
Nov 16 '06 #6
Howard wrote:
"HELLO $$$" <fa***@alphalink.com.auwrote in message
news:45********@news.chariot.net.au...
>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.
Nov 17 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: C-turtle | last post by:
One C program writing practice is this: You write a function: myfunction(){ // a lot of code } They you write a main with code to test myfunction: main(int argc, char** argv){
6
by: Charles Krug | last post by:
Here's the deal: I've a dead-simple command-line program I'm using to test things that I can't (for various reasons) test in the IDE. Here's a do-nothing subset that shows the idea: #...
2
by: Kevin S. Goff | last post by:
I'm coming into a situation where a company has both 1.1 and 2.0 ASP.NET apps on the same server. Each application has been configured (using IIS) for the appropriate framework (on that last...
1
by: sunil | last post by:
Hello All. I have written a program as an exe that performs some kind of order processing. The program is first configured and then started manually. I have have multiple instances of this...
41
by: Gary Wessle | last post by:
Hi often I need to read numbers and only keep the highest or lowest. so I do something like int uLimit = 0; int lLimit = 999999999999; //hoping the compiler will not complain uLimit =...
2
by: saggydel | last post by:
I have 3 web application these all are independent to each other. 1 web application have .aspx, .aspx.cs, web.config, .dll and some other Supporting files. I want to make a common setup of all 3...
3
by: ebeard | last post by:
I have replaced apache with nginx and now run php in FASTCGI server mode like this: PHP_FCGI_CHILDREN=6 php -b 127.0.0.1:9086 -c /my/php/ini/path nginx reverse proxies to php and this works...
7
by: ashjas | last post by:
Hello, I have run this logic on turboc++ 3.0 and it is working fine on it but its not running on msvs2008 c++. i am not able to assign the value like this *temp=*main,where main and temp are char...
1
by: Cramer | last post by:
I'm running XP Pro/SP2 + patches and updates, with Visual Studio Professional 2008 (and no prior installation of Visual Studio ever installed). When attempting to open an ASP.NET Web application...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.