Gcc

Hi there

while I was playing with GCC version it turn out that version on my computer is
with MinGW is 5.2.0 and when I installed Cygwin64 I am on 5.3.0
However, I can see on gcc website that they have version 7?

Question is should I upgrade to version 7? (I don't do any serious development or such, just learning from books, courses, youtube and of course here :))

2nd can i upgrade Cygwin or MinGW to version 7???

thanks :)
Question is should I upgrade to version 7? (I don't do any serious development or such, just learning from books, courses, youtube and of course here :))


If you can do c++14 then you may be happy with your current installation. If you do want to get involved in c++17, then it sounds as though it is possible to upgrade to the latest version of gcc which is 7.1.

This link details how to build gcc:

http://cygwin.wikia.com/wiki/How_to_install_a_newer_version_of_GCC

Good Luck !!
> it turn out that version on my computer is with MinGW is 5.2.0 ...
> However, I can see on gcc website that they have version 7?
> Question is should I upgrade to version 7?

Ideally, yes. Download pre-built MinGW with GCC 7.1.0 and Boost 1.64.0 from here: https://nuwen.net/mingw.html

Unless you are experimenting, stay with C++14 for the present - even though they make the highly questionable claim that it is a complete C++17 implementation.
Hi JLBorges

Wise words :)
I am not in rush to burn my fingers, I am finding that C++ is fascinating but as well is hard (especially this is my first language I am learning)
so I will take your advise and hold on for now.


You have suggested boost, so far during my studying no one mention boost.
Where would you use boost? my knowledge about boost is practically non existent atm.


thanks :)
> Where would you use boost? my knowledge about boost is practically non existent atm.

Boost is a collection of well-written and widely used C++ libraries.
Background information: http://www.boost.org/users/

Right now, learning to use the standard library would be the priority.
However, the standard library does not include everything that a programmer may need.

For instance, if we want to compute the factorial of 100, we would need an integer type that has a very large range. Using boost multiprecision, the code would look easy and familiar even to a beginner:
1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
#include <boost/multiprecision/cpp_int.hpp>

int main()
{
    using int_type = boost::multiprecision::cpp_int ;

    int_type fact = 1 ;
    for( int n = 1 ; n < 101 ; ++n ) fact *= n ;
    std::cout << "100! is: " << fact << '\n' ;
}

http://coliru.stacked-crooked.com/a/9894a9169952f429
Cool i will keep this in mind. I was wondering about boost and weather I should be paying more attention to it.

JLBorges do you know about places where I could get more experience in c++?
I could do commit 1 day a week for this?

Thanks :)
> places where I could get more experience in c++?

Try to locate a local C++ expert who is accessible to you, and request that person to have a look at the code that you write. Watch the exper solve programming problems; read the code and ask why it was done in a particular way. The importance of mentoring in learning C++ can't be overstated.

Get a good text book - for example, Stroustrup's 'Programming -- Principles and Practice Using C++ (Second Edition)'. Do all the drills and exercises in the book. To quote from the preface to the book:
... try to work with others. Programming has an — unfair — reputation as a lonely activity. Most people work better and learn faster when they are part of a group with a common aim. Learning together and discussing problems with friends is not cheating! It is the most efficient — as well as most pleasant — way of making progress. If nothing else, working with friends forces you to articulate your ideas, which is just about the most efficient way of testing your understanding and making sure you remember.


A third thing that you could do is do what you are already doing: post questions on these forums and study the answers; if required, ask follow-up questions.
Thanks JLBorges :)

I am trying to do as much as I can on all fronts. I am in touch with host of London C++ meet-up and i am actively encouraging him to do something with trainings things etc :)

Topic archived. No new replies allowed.