• 0

[C++ & Java] Compiling & Programming Questions


Question

Hello all,

As you can see by my post count, I'm new to Neowin, but I have been visiting for months now and count on this site for the most up-to-date news, and I just want to thank Neowin for that.

Now to my real questions... I have Microsoft Visual Studio .NET 2003 Pro and have been interested in programming and have taken a few C++ classes, but I cannot find out how to compile my C++ code (filename.cpp file types) For example, I would like to compile the Hello World program I am sure most of you are aware of. But I am unable to find the compile and execute command where it will compile it, make and EXE filetype and run the exe in a DOS prompt saying "Hello World". I was taught using a different MS application where it was simply in the menu, but I am unable to find it in Visual Studio .Net.

So where is the compile and execute command? I have been using Bloodshed Dev C++ as a supplement, but would like to learn how to compile in VS .Net. Or is there another MS application I can purchase to do such things? Mostly C/C#/C++ things.

Also, my next question regarding Java... How will I go about finding a program to program in Java (besides using MS VS .NET)? I heard that there is a program I can download from Sun/Java's site, but I am not sure which to download and the name of it.. Or do you have a recommendation of a program I can purchase?

Any help or assistance is much appreciated.

Looking forward to hearing from users and thanks for taking the time to help me out. I appreciate it a lot.

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

  • 0

within Visual Studio create a new win32 console application

make it an empty project

add your .cpp file to the source folder

right click on the .cpp file and compile

Build the project

Link to comment
Share on other sites

  • 0

For Java, download the latest Java SDK (currently at 5.0) and if you want an IDE to program Java, I would suggest eclipse.org (latest is 3.0.1).

There's probably good tutorials on how to easily compile java file in eclipse for new users on Google.

Link to comment
Share on other sites

  • 0

About Java IDE.

Eclipse is one of the best free ones.

But since you've mentioned that you can buy one, then take a look into JBuilder.

It's the one of most popular commercial Java IDEs:

http://borland.com/products/downloads/download_jbuilder.html

They offer free trials, so you can try it yourselves and compare with Eclipse to understand what is a good choice for you.

Link to comment
Share on other sites

  • 0

for Java, if you dont like those other IDEs, just create a J# project. J# is the java syntax and java library from 1.2 (i think) for .NET.

STV

Link to comment
Share on other sites

  • 0

Wow! Thanks for the answers and suggestions. I spent over a week trying to figure out how to compile a simple CPP file. :) Now I know you have to create an empty project and then go from there...

Thanks for the suggestions for the Java IDE's such as Eclipse. I also installed netBeans IDE 4.0 Beta on my test mahcine to try it out. Since it's a beta version, I rather not put it on my important computer. As for JBuilder, I will look into it. I will probably stick with Eclipse for now, and as I get further into Java programming I will consider purchasing that.

Link to comment
Share on other sites

  • 0
for Java, if you dont like those other IDEs, just create a J# project.? J# is the java syntax and java library from 1.2 (i think) for .NET.

STV

584724668[/snapback]

J# is java syntax for the .NET Framework; it doesn't use any part of the Java VM/libs.

However, If you're going to use J#, you might as well learn C# because it's the real language behind .NET, and it's very easy to migrate to.

Link to comment
Share on other sites

  • 0

actually, xGameGuy, i read somewhere that the java library (not the one from sun, but an implementation by MS) is used in J#.NET. that is why you can say:

System.out.println("hello world");

and

System.Console.WriteLine("hello world");

when writing J# console apps.

STV

Link to comment
Share on other sites

  • 0
actually, xGameGuy, i read somewhere that the java library (not the one from sun, but an implementation by MS) is used in J#.NET.  that is why you can say:

System.out.println("hello world");

and

System.Console.WriteLine("hello world");

when writing J# console apps.

STV

584728822[/snapback]

And I can use IsNumeric() and Val() in VB.NET, but that doesn't mean it uses the VB6 runtimes ;) Look at the compiled IL of those functions. They probably link to some managed method in the .NET Framework, just like the VB6 style functions do.

Link to comment
Share on other sites

  • 0
actually, xGameGuy, i read somewhere that the java library (not the one from sun, but an implementation by MS) is used in J#.NET.  that is why you can say:

System.out.println("hello world");

and

System.Console.WriteLine("hello world");

when writing J# console apps.

STV

584728822[/snapback]

J# is just a .NET language. It doesn't use a VM. MS aliases Console.Writeline with out.println in the J# libraries, but ultimately the same method is called. The J# libraries provide most of the 1.1.4 capability, and some of the java.util 1.2 capability, but they are .NET libraries.

Link to comment
Share on other sites

  • 0

weenur, i know they are, that is why i said "(not the one from sun, but an implementation by MS)"

i know that programs written in J# dont use a JVM, it uses the .NET CLR. J# goes through the same "source code --> MSIL" process that all .NET languages go though.

STV

Link to comment
Share on other sites

  • 0
weenur, i know they are, that is why i said "(not the one from sun, but an implementation by MS)"

584729523[/snapback]

the java library (not the one from sun, but an implementation by MS) is used in J#.NET.

584728822[/snapback]

You're right, it's not from Sun, but it's not an "implimentation" of any Java libs either. It's the .NET Framework. I could write VB.NET code to use J#'s system.out.println() if I wanted and J# code to use VB.NET's IsNumeric() too. Granted, there would be no point, but I could do it.

Link to comment
Share on other sites

  • 0

i use implementation in the general sense. to me, these "j# libs" are just wrapper around existing functionality already in the framework. would this be an accurate assumption?

STV

Link to comment
Share on other sites

  • 0
i use implementation in the general sense.  to me, these "j# libs" are just wrapper around existing functionality already in the framework.  would this be an accurate assumption?

STV

584729609[/snapback]

I think that's an accurate statement.

Link to comment
Share on other sites

  • 0

at my old high school, there was this girl that kept saying, "Friends dont let friends use JCreator". is there any truth to this statement, because it seemed kinda funny to me.

STV

Link to comment
Share on other sites

  • 0
at my old high school, there was this girl that kept saying, "Friends dont let friends use JCreator".  is there any truth to this statement, because it seemed kinda funny to me.

STV

584771184[/snapback]

i love jcreator, its the only java ide that i'll use..fast (not coded in java) and does what i need it to do

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.