在去c++之前,我应该先学些什么?

时间:2021-09-26 07:15:22

I'm learning C, but after that or in the meanwhile, what should I learn first and subsequently before getting into C++ ? Compilers, Data Structures, UML or Design Patterns ?(also when start to learn Win32 API ?) I'm not in a hurry at all, so I can grasp the requirements from the deepest beginning. I just don't want to get lost for being cursory and negligent.

我正在学习C语言,但在那之后,在进入c++之前,我应该先学习什么?编译器、数据结构、UML还是设计模式?我一点也不着急,所以我可以从最深处把握需求。我只是不想因为粗心大意而迷路。

In addition to this, which subjects on mathematics has most impact on coding very well ? Linear Algebra, Discrete Mathematics, Calculus ?

除此之外,数学科目对编码的影响最大?线性代数,离散数学,微积分?

I'll be thankful if someone guides me through this journey. There are many questions I would like to know the answers. Thanks.

如果有人引导我走过这段旅程,我会很感激。有许多问题我想知道答案。谢谢。

3 个解决方案

#1


14  

First you should learn that C++ is not a superior language. C has its uses as more than a stepping stone into C++. C, and "C-style" C++ are used because they:

首先,您应该了解c++不是一种高级语言。C的用途不仅仅是成为c++的垫脚石。C和C型的c++被使用是因为:

  • Generate smaller binaries
  • 生成更小的二进制文件
  • Use less memory
  • 使用更少的内存
  • Compile faster
  • 编译速度
  • Do not require OS-support
  • 不需要操作系统支持
  • Are simpler, and easier to implement
  • 是否更简单、更容易实现

Data structures are by far the most useful of the listed to learn, followed by algorithms. If you intend to go into C++, it's also useful (mandatory?) to have good design skills.

到目前为止,列出的数据结构最有用,其次是算法。如果您打算学习c++,拥有良好的设计技能也很有用(必须吗?)

You should not necessarily learn Win32 at all. Consider learning the POSIX APIs, GTK+ and Boost, as they're more portable, and work on platforms other than Windows.

你根本不需要学习Win32。考虑学习POSIX api、GTK+和Boost,因为它们更具有可移植性,并且可以在Windows之外的平台上工作。

The best decision you can make is to learn C thoroughly as a separate skill on a Unix platform, before crutching yourself by not being able to see the difference between C and C++.

您可以做的最好的决定是在Unix平台上将C作为一种独立的技能进行彻底的学习,然后再通过看不到C和c++之间的区别而使自己崩溃。

Of the listed Mathematics disciplines, I've only used discrete mathematics. Linear algebra is also useful, but by far and away the best discipline for programming is set and number theory.

在列出的数学学科中,我只使用离散数学。线性代数也很有用,但显然,编程的最佳准则是集合和数论。

Enjoy your time in C, don't become dependent on Windows/Visual Studio, and don't rush into C++.

在C语言中享受你的时间,不要依赖于Windows/Visual Studio,不要匆忙进入c++。

Update0

Almost forgot! You absolutely must use a decent C compiler. A central reason to C++'s wide use in enterprise, and the bad reputation C has among Windows developers is Visual Studio. Visual Studio is easily the best C++ IDE, however it's also the worst C compiler I know of. Be sure to use a C compiler with C99 support, such as GCC, mingw or Clang. My first experience with C was using LCC, which was very easy to use on Windows, but I haven't used it since moving to Linux, so I can't comment on its C99 status.

差点忘了!您绝对必须使用一个像样的C编译器。c++在企业中的广泛应用以及C在Windows开发人员中的坏名声的一个主要原因是Visual Studio。Visual Studio很容易是最好的c++ IDE,但是它也是我所知道的最差的C编译器。确保使用C99支持的C编译器,如GCC、mingw或Clang。我使用C的第一次经验是使用LCC,这在Windows上非常容易使用,但是自从我搬到Linux之后就没有使用过它,所以我不能评论它的C99状态。

#2


3  

Compilers, Data Structures, UML or Design Patterns ?

编译器、数据结构、UML还是设计模式?

Data Structures and Algorithms.

数据结构和算法。

In addition to this, which subjects on mathematics has most impact on coding very well ? Linear Algebra, Discrete Mathematics, Calculus ?

除此之外,数学科目对编码的影响最大?线性代数,离散数学,微积分?

Discrete Mathematics and Number Theory.

离散数学和数论。

#3


0  

You should learn to program in a well structured language first: Ocaml is recommended, Haskell is also good but a bit harder to get a working compiler and harder to learn because it is purely functional.

您应该首先学习用一种结构良好的语言编写程序:Ocaml是推荐的,Haskell也很好,但是要获得一个可用的编译器有点困难,学习起来也比较困难,因为它是纯函数的。

Mathematics is of little use in programming (the math that is useful is too hard, namely category theory). However some basic type theory is useful.

数学在编程中用处不大(有用的数学太难了,即范畴理论)。然而一些基本类型理论是有用的。

You can't learn good programming in languages like C, the important stuff is too deeply buried in housekeeping tasks and historical stupidities.

你不可能在C语言中学习到好的编程,重要的东西被隐藏在管理任务和历史的愚蠢之中。

#1


14  

First you should learn that C++ is not a superior language. C has its uses as more than a stepping stone into C++. C, and "C-style" C++ are used because they:

首先,您应该了解c++不是一种高级语言。C的用途不仅仅是成为c++的垫脚石。C和C型的c++被使用是因为:

  • Generate smaller binaries
  • 生成更小的二进制文件
  • Use less memory
  • 使用更少的内存
  • Compile faster
  • 编译速度
  • Do not require OS-support
  • 不需要操作系统支持
  • Are simpler, and easier to implement
  • 是否更简单、更容易实现

Data structures are by far the most useful of the listed to learn, followed by algorithms. If you intend to go into C++, it's also useful (mandatory?) to have good design skills.

到目前为止,列出的数据结构最有用,其次是算法。如果您打算学习c++,拥有良好的设计技能也很有用(必须吗?)

You should not necessarily learn Win32 at all. Consider learning the POSIX APIs, GTK+ and Boost, as they're more portable, and work on platforms other than Windows.

你根本不需要学习Win32。考虑学习POSIX api、GTK+和Boost,因为它们更具有可移植性,并且可以在Windows之外的平台上工作。

The best decision you can make is to learn C thoroughly as a separate skill on a Unix platform, before crutching yourself by not being able to see the difference between C and C++.

您可以做的最好的决定是在Unix平台上将C作为一种独立的技能进行彻底的学习,然后再通过看不到C和c++之间的区别而使自己崩溃。

Of the listed Mathematics disciplines, I've only used discrete mathematics. Linear algebra is also useful, but by far and away the best discipline for programming is set and number theory.

在列出的数学学科中,我只使用离散数学。线性代数也很有用,但显然,编程的最佳准则是集合和数论。

Enjoy your time in C, don't become dependent on Windows/Visual Studio, and don't rush into C++.

在C语言中享受你的时间,不要依赖于Windows/Visual Studio,不要匆忙进入c++。

Update0

Almost forgot! You absolutely must use a decent C compiler. A central reason to C++'s wide use in enterprise, and the bad reputation C has among Windows developers is Visual Studio. Visual Studio is easily the best C++ IDE, however it's also the worst C compiler I know of. Be sure to use a C compiler with C99 support, such as GCC, mingw or Clang. My first experience with C was using LCC, which was very easy to use on Windows, but I haven't used it since moving to Linux, so I can't comment on its C99 status.

差点忘了!您绝对必须使用一个像样的C编译器。c++在企业中的广泛应用以及C在Windows开发人员中的坏名声的一个主要原因是Visual Studio。Visual Studio很容易是最好的c++ IDE,但是它也是我所知道的最差的C编译器。确保使用C99支持的C编译器,如GCC、mingw或Clang。我使用C的第一次经验是使用LCC,这在Windows上非常容易使用,但是自从我搬到Linux之后就没有使用过它,所以我不能评论它的C99状态。

#2


3  

Compilers, Data Structures, UML or Design Patterns ?

编译器、数据结构、UML还是设计模式?

Data Structures and Algorithms.

数据结构和算法。

In addition to this, which subjects on mathematics has most impact on coding very well ? Linear Algebra, Discrete Mathematics, Calculus ?

除此之外,数学科目对编码的影响最大?线性代数,离散数学,微积分?

Discrete Mathematics and Number Theory.

离散数学和数论。

#3


0  

You should learn to program in a well structured language first: Ocaml is recommended, Haskell is also good but a bit harder to get a working compiler and harder to learn because it is purely functional.

您应该首先学习用一种结构良好的语言编写程序:Ocaml是推荐的,Haskell也很好,但是要获得一个可用的编译器有点困难,学习起来也比较困难,因为它是纯函数的。

Mathematics is of little use in programming (the math that is useful is too hard, namely category theory). However some basic type theory is useful.

数学在编程中用处不大(有用的数学太难了,即范畴理论)。然而一些基本类型理论是有用的。

You can't learn good programming in languages like C, the important stuff is too deeply buried in housekeeping tasks and historical stupidities.

你不可能在C语言中学习到好的编程,重要的东西被隐藏在管理任务和历史的愚蠢之中。