Dont have a DOS machine? Dont have a DOS compiler?
use this;
http://www.delorie.com/djgpp/compile/
Dont have a DOS machine? Dont have a DOS compiler?
use this;
http://www.delorie.com/djgpp/compile/
"...since anyone who is anyone knows C..." -Peter Cellik
That's a nice online compiler.
But the problem is that it compiles for DOS only.
I tried compiling simple hello world program but it doesn't run under Windows.
I thought the program should work as console mode program for windows but its pure dos based.
I would like to know if there is such online compiler for linux ?
It may be protected mode but the file-format probably isn't PE/COFF compliant...anyway it's a cool concept tho...
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
You know, I was going to do that for Assembly, but I could never figure out how to put the macros into binary machine language...
Cool idea... but not really that practical. :\
About the hello world thing, it worked on my computer and I'm using XP. The problem with my computer is that it exits and closes programs without leaving the screen open to see (just blinks black and then it's gone). All I did to fix this was to include conio.h and threw in a getch() statement before the return 0; Maybe it would work on yours if you did the same?
Not practical? Yeah I found that out.
Isn't that supposed to happen with any dos program in any windows OS?
The hello world program works fine on my computer.
VC++ 6
With my last computer (P2, 233MHz) in Windows 95 the window stayed open after the program ended. I usually program in dos with my 486, so I couldn't tell you about in 3.1. Maybe it was just an option I hit somewhere a long time ago that made it stay open... My new computer with XP closes right away if there isn't a "press any key" thing, which is new to me. (not to mention annoying)Originally posted by Sean
Isn't that supposed to happen with any dos program in any windows OS?
Well I guess that'll solve some problems but cause others... I tried it out in 3.1, and it leaves the window open.
Thus further proving that Windows 3.1 was the best windows of all time.
Btw, Sean, what web browser are you using in 3.1?
Heh... I did that too, but the first time I forgot to add the conio.h library.Originally posted by Nuke
All I did to fix this was to include conio.h and threw in a getch() statement before the return 0;
Having a maximum of a 1K source file is extremely limiting... I should email and ask them how they set that up. Could try sticking it on my own site and using it when I need a compiler.
Anyways... it's better than lugging Borland C++ around.
There should be an option called "Close on" something. Just click it off. I can't seem to find it under XP, but I know it's on the 9x/Me ones.
Actually, If you run a DOS program from the desktop you have to go into the shortcut and on the program tab. If the shortcut is a .PIF file there is usually a "Close on exit" checkbox. If it isn't there, the shortcut is probably a .LNK file.
I don't know how to make the shortcut one or the other, if someone does please let me know. I beleive most install programs from the looks of it create a .LNK shortcut.
Walt