Online Compiler

This is a discussion on Online Compiler within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Dont have a DOS machine? Dont have a DOS compiler? use this; http://www.delorie.com/djgpp/compile/...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    70

    Online Compiler

    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

  2. #2
    Dev
    Dev is offline
    Registered User Dev's Avatar
    Join Date
    Mar 2003
    Posts
    59
    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 ?

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    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;
    }

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    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...

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    73
    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?

  6. #6
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Not practical? Yeah I found that out.

    Isn't that supposed to happen with any dos program in any windows OS?

  7. #7
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    The hello world program works fine on my computer.
    VC++ 6

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    73
    Originally posted by Sean

    Isn't that supposed to happen with any dos program in any windows OS?
    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)

  9. #9
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Well I guess that'll solve some problems but cause others... I tried it out in 3.1, and it leaves the window open.

  10. #10
    Registered User
    Join Date
    Mar 2003
    Posts
    73
    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?

  11. #11
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    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;
    Heh... I did that too, but the first time I forgot to add the conio.h library.

    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.

  12. #12
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    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.

  13. #13
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,161
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. lcc win32 compiler download problems
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-01-2004, 07:39 PM
  2. OpenScript2.0 Compiler
    By jverkoey in forum C++ Programming
    Replies: 3
    Last Post: 10-30-2003, 12:52 PM
  3. Compiler Design... Anyone That Can Help!
    By ComputerNerd888 in forum C++ Programming
    Replies: 3
    Last Post: 09-27-2003, 09:48 AM
  4. Comile problem using latest Dev C++ Compiler
    By shiny_dico_ball in forum C++ Programming
    Replies: 6
    Last Post: 06-06-2003, 05:32 PM
  5. Bad code or bad compiler?
    By musayume in forum C Programming
    Replies: 3
    Last Post: 10-22-2001, 09:08 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21