I am using netbeans to compile my very simple program. when i try to run the exe on a windows machine it gives me a command prompt screen and then an error saying that ntdvm can not run the program.
When i released netbeans created a main.o file and i changed the name of that to main.exe.
We need you to provide us a little more information can you give us the exact detail of the error for example if any error code\number is showing and the exact word to word error message.
I compiled your code with my code::blocks compiler an its working fine
so why not download it http://www.codeblocks.org/downloads and then see the difference
The problem is that he changed the object file to an .exe they are different
a .o (object) is unlinked machine code and an .exe(executable) is linked machine code. You would have to link the .o then convert to an .exe if you want to run it that way AFAIK.
The more advanced users might have more info though.
thank you giblit. you are on to something. can you create an exe directly from netbeans? I can run the main.o and/or a.out when using g++ at command prompt just fine from command prompt but i am wanting to create a program that i can have another person use without flaw in windows.