Thread: Hello World won't work.

  1. #16
    Registered User
    Join Date
    Apr 2006
    Posts
    8
    it had to have been something wrong with my compiler options, because i set them back to default and it is working fine now. The only thing is, i dont remember messing with the options. oh well aslong as it is working now i guess it is fine.
    thanks for the help.

  2. #17
    Registered User
    Join Date
    Apr 2006
    Posts
    22
    Quote Originally Posted by bumfluff
    Well I use that exact same version of Dev-C++ and it works fine for me.

    Maybe it is something to do with how he is making the file...ie creating a c style project or something.
    probaly, you seem mad and i didn't mean that dev-c++ is bad, i've considered using it a lot of times, however mingw just seems to work better for me ( that and it's specifically ported for win32 so i don't worry about errors ) .

  3. #18
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    i didn't mean that dev-c++ is bad, i've considered using it a lot of times, however mingw just seems to work better for me
    Um...
    Code:
    class mingw
    {
    };
    class devcpp
    {
        public:
            mingw defaultcompiler;
    }
    Yes? No?
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  4. #19
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Quote Originally Posted by c89c
    probaly, you seem mad and i didn't mean that dev-c++ is bad, i've considered using it a lot of times, however mingw just seems to work better for me ( that and it's specifically ported for win32 so i don't worry about errors ) .
    Yes I am very mad!

    I like the Dev-C++ Interface as it is easy to use, a lot easier than V C++ Express 2005 which I downloaded.

  5. #20
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Each to his own. Some like DevC++, I fancy the MSVC++.NET 2002/2003 IDE, some like Code::blocks, some like to type code in notepad and use a command-line compiler, some like some other IDE. You cant say that this is better than that.

    But just so people in the thread know, DevC++ comes with MingW as the default compiler.
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  6. #21
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    What's a compiler?
    Woop?

  7. #22
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Isn't it this person who sits in Oxford and puts everything together in one big ring-binder

  8. #23
    Registered User
    Join Date
    Apr 2006
    Posts
    22

    Talking

    The compiler is what turns your code into a program.


    And I didn't know that dev-c++ uses mingw. which port is it? Win32? I'll go download it and try.

  9. #24
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    The compiler is what turns your code into a program.
    Actually, a compiler takes your preprocessed code and turns it into executable code, ready for the linker (at least for C/C++ compilers).

    I think it's a joke. You'd think that someone with 1,268 posts would know what a compiler was, wouldn't you?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  10. #25
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    Why not google before asking more questions about DevC++??
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  11. #26
    Registered User
    Join Date
    Apr 2006
    Posts
    22

    Talking

    Quote Originally Posted by dwks
    Actually, a compiler takes your preprocessed code and turns it into executable code, ready for the linker (at least for C/C++ compilers).

    I think it's a joke. You'd think that someone with 1,268 posts would know what a compiler was, wouldn't you?
    didn't notice he had 1000+ posts when i answered.

  12. #27
    Registered User
    Join Date
    Feb 2005
    Posts
    76
    system ("PAUSE");
    return EXIT_SUCCESS;

  13. #28
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    That's a non-standard way to wait for a keypress with a C function.

    See the FAQ.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  14. #29
    Registered User
    Join Date
    Dec 2005
    Location
    192.168.1.1
    Posts
    4
    Quote Originally Posted by robasc
    system ("PAUSE");
    return EXIT_SUCCESS;
    I agree with this guy. In dev-c++, if you are just making a new and blank project and type your code there, the program would come out and disappear within a second.

    You need to use the pause command at the end in order to stop it from disappearing.

    The program should work, and I think it did work, it's just that you couldn't see it since it closes too quickly.

  15. #30
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Keep commands to the console out of your program.
    Code:
    cin.get();
    The get() function waits for the user to press the enter key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Developers Wanted
    By Quasicom in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 08-24-2005, 12:46 AM
  2. Novice Beginner: Simple hello world wont work
    By hern in forum C++ Programming
    Replies: 8
    Last Post: 06-25-2005, 12:16 PM
  3. OpenGL coordinates
    By Da-Nuka in forum Game Programming
    Replies: 5
    Last Post: 01-10-2005, 11:26 AM
  4. Too much to ask ?
    By deflamol in forum C Programming
    Replies: 2
    Last Post: 05-06-2004, 04:30 PM