Like Tree2Likes

Simple Basic Questions

This is a discussion on Simple Basic Questions within the C++ Programming forums, part of the General Programming Boards category; I used to do some programming in C, mostly related to modifying a mud known as ROM 2.4. I've never ...

  1. #1
    Registered User
    Join Date
    Jun 2015
    Location
    Lima, Peru
    Posts
    9

    Simple Basic Questions

    I used to do some programming in C, mostly related to modifying a mud known as ROM 2.4. I've never worked in C++

    Recently I've become interested in the program Stockfish, a computer chess-playing program, that has been written in C++

    I was looking over the program, saw some things and thought, "That's really dumb... why don't they just change it like so..." and the urge has come over me to tweak it a bit and then compile it.

    So I went online looking for a reasonable (ideally free) compiler. I found a thread that said, "Why not just get a good IDE?"

    Then I thought... isn't an IDE a type of hard drive? So then I realized that I was out of my depth, so I came here.

    What's an IDE? Why is it better than a compiler? Is there an easy-to-use C++ compiler for windows 7 that I can use to get Stockfish up and running on my PC?

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,981
    https://en.wikipedia.org/wiki/Integr...nt_environment
    Simply put, it gathers all your tools integrated into one editor. Compiler, profiler, debugger, editor, etc.

    What's a good one? Visual Studio or Code::Blocks are good choices. If you pick Code::Blocks, be sure to pick one that includes mingw.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Informer -Adrian's Avatar
    Join Date
    Jan 2013
    Posts
    222
    An IDE (Integrated Development Environment) is basically a feature rich text editor, so it's not in the same category as a compiler. They often come with intelligent features that make the management of large code bases easier to handle. The person suggesting to "just use an IDE" probably meant that (for a beginner) installing an IDE which comes with some compiler (ready to go) is easier than setting up the compiler yourself and fiddling with the command line to get a program to compile.

  4. #4
    Informer -Adrian's Avatar
    Join Date
    Jan 2013
    Posts
    222
    Quote Originally Posted by Elysia View Post
    Visual Studio or Code::Blocks are good choices. If you pick Code::Blocks, be sure to pick one that includes mingw.
    Another one that's pretty good these days is QtCreator, even if one doesn't work with Qt libraries at all. Nice GUI.

  5. #5
    Registered User
    Join Date
    Mar 2015
    Posts
    182
    And an IDE may be considered better because it lets you avoid maintaining makefiles. Also Compiling from the editor is just a single keystroke and makes large projects. manageable.

  6. #6
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    1,836
    Yeah, I'm still not really sure how to write a Makefile from scratch lol.

  7. #7
    Registered User
    Join Date
    Mar 2015
    Posts
    182
    Same, and the mingw make on windows is just buggy. To make make work (hehe) you may have to rely on a POSIX environment like MSYS. I just refuse to have anying POSIX in my windows toolset, ports or native only.

  8. #8
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    1,836
    Our programming ancestors would be so disappointed in us.

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,772
    Quote Originally Posted by jiggunjer
    I just refuse to have anying POSIX in my windows toolset, ports or native only.
    If I understand correctly, the POSIX standard incorporates the C standard (as does C++, to some extent), so that is kind of a tough requirement.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  10. #10
    Registered User
    Join Date
    Mar 2015
    Posts
    182
    But unix systems compile against the posix libraries, as opposed to the windows c++ runtime libraries? Though I admit I don't know much about operating systems or compiling.

  11. #11
    Registered User
    Join Date
    Oct 2006
    Posts
    2,859
    Quote Originally Posted by MutantJohn View Post
    Our programming ancestors would be so disappointed in us.
    Or proud because we've developed such advanced tools to make our lives easier.

    Quote Originally Posted by jiggunjer View Post
    But unix systems compile against the posix libraries, as opposed to the windows c++ runtime libraries? Though I admit I don't know much about operating systems or compiling.
    There is no "posix library." POSIX is a standard, describing an API for operating systems, which is supported by many operating systems. Windows used to officially support it, through a sort of emulation layer, but that support ended with XP/Server 2003. Cygwin requires a POSIX emulation layer, in the form of their cygwin.dll, which is probably why you think MinGW does. MinGW is a direct port to Win32/64. MinGW is no more buggy than Microsoft's compiler. Plenty of great software has been built with MinGW. There is no requirement to use the MSYS system. In fact, I'd guess that most MinGW users probably don't use it at all, except for those projects that need to be built with the typical unix configure/make/make install system. If you are only building your own projects, you can likely avoid MSYS entirely.
    Elysia and -Adrian like this.
    Code:
    namespace life
    {
        const bool change = true;
    }

  12. #12
    Registered User
    Join Date
    Jun 2015
    Location
    Lima, Peru
    Posts
    9
    I have downloaded Code::Blocks. It has a GCC compiler as default.

    I want to affiliate the source code that I have as a project. The source code is contained at c:\stockfish\src\

    How do I do so?

  13. #13
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,924
    Create a new project, then add the file. Both can be done from the toolbar.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  14. #14
    Registered User
    Join Date
    Jun 2015
    Location
    Lima, Peru
    Posts
    9
    Well, yes, but there are many different types of projects that could be created. Which ones do I want? When I "add the file" do I add the Makefile? All the .cpp and .h files? How does that work?

  15. #15
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,981
    A Win32 console / Windows application should suffice. Just add the source and header files. Unless the project does something weird, it should suffice, I think.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Basic C questions
    By voklta7 in forum C Programming
    Replies: 5
    Last Post: 05-07-2015, 12:43 PM
  2. Some Basic questions
    By BlaX in forum C Programming
    Replies: 7
    Last Post: 06-30-2009, 09:51 AM
  3. basic questions about C
    By -EquinoX- in forum C Programming
    Replies: 6
    Last Post: 03-13-2008, 03:59 AM
  4. Basic questions about C
    By FlatLost in forum C Programming
    Replies: 6
    Last Post: 11-01-2005, 12:08 PM
  5. basic questions on C#
    By black in forum C# Programming
    Replies: 3
    Last Post: 12-09-2003, 08:23 AM

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