只会 Python 但有算法/数学背景,如何快速进修学习成为 C++ 程序员?
我平常只用Python,不追求速度时做一些简单数学计算很方便,但工作必须学会C++。
回复内容:
我也是先学的Python再学的C++。学了Python对理解OO有一定好处,但是也会让你Spoiled到觉得C++很麻烦,好多工具不够Intuitive。下面是我的进阶路线:基础:找一门入门公开课,比如MIT OCW上的Introduction to C++,或者我们学校的CS11 C++ Track ,把slides浏览一遍,把最后几个作业练习写一写,快速大致了解一下C++的基本语法。
进阶:在oj.leetcode和更高级的online judge上把比较难的题(通过率Effective Programming in C and C++或者我们学校的CS11 Advanced C++ Track。学习和练习template和class inheritance之类的概念。
高级:看书。Effective C++和C++ Primer在这个级别都得要看了,还要学习C++11里面的新东西。另外,暑假实习的时候组里有个GETCO跳槽来的C++大神坐在我旁边,向我推荐了一门很好的课叫Performance Engineering of Software Systems。他说这个课基本上就是为搞Quant Trading System准备的,非常实用。
当然了,我这里的“基础/高级”都是对于我这个渣水平而言的,各位大神见笑了。不过既然题主跟我是同行,想必学C++也是为了开发交易策略用的,那么我觉得上面三步走完基本够用了。 cpp很难吗?用到的时候再看不就好了,空学意义不大 Accelerated C++ (豆瓣) c++primer + effective c++ 我怎么觉得从python到c++和你算法数学没啥关系呢。写好程序是要好算法但是学怎么用语言貌似和算法没啥关系吧 Python大法好,退cpp保平安! 不精通C去学C++,会有麻烦,这事快不了。如果你能用C去实现各种复杂算法,再去学C++,就会容易得多 我觉得会有人让你去翻他的帖子 python和c++的区别主要是在两个大方面:python是动态语言,而c++是静态语言(不过c11之后c++中也引入了动态的概念,比如lambda和auto等),这是一方面;另外就是代码的格式不一样,python是通过缩进的方式来定义作用域,而c++则是通过大括号等。其他的都是相通的了。我曾尝试过python,但是无法忍受他的缩进方式! 个人用C++的时间远大于python就来随便说说。。。以下内容基于个人使用经验,python使用时间不是很多没有做过很大的项目也就是小服务器什么的。。。
python实际上一般都是在描述一个问题的解决流程,因为实际上用python的大部分时间都是在糙快猛啊。。。
而C++一开始就是要思考一个问题在解决时会遇到的事物,而这些事物是怎么关系到这个问题的解决的。。。自顶向下的去解析整个class的树,然后写一堆header,然后填点cpp,完成。。。
STL什么的推荐就是知道一些然后查http://en.cppreference.com/w/就好了。。。
差不多知道个vector知道个map知道个set就差不多了。。。
如果要写比较严谨的项目的话,可能会需要像shared_ptr之类的。。。
推荐先实现一些小东西找一找感觉,比如自己实现一个简单地vector啊之类的。。。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

VS Code can be used to write Python and provides many features that make it an ideal tool for developing Python applications. It allows users to: install Python extensions to get functions such as code completion, syntax highlighting, and debugging. Use the debugger to track code step by step, find and fix errors. Integrate Git for version control. Use code formatting tools to maintain code consistency. Use the Linting tool to spot potential problems ahead of time.

Running Python code in Notepad requires the Python executable and NppExec plug-in to be installed. After installing Python and adding PATH to it, configure the command "python" and the parameter "{CURRENT_DIRECTORY}{FILE_NAME}" in the NppExec plug-in to run Python code in Notepad through the shortcut key "F6".

VS Code extensions pose malicious risks, such as hiding malicious code, exploiting vulnerabilities, and masturbating as legitimate extensions. Methods to identify malicious extensions include: checking publishers, reading comments, checking code, and installing with caution. Security measures also include: security awareness, good habits, regular updates and antivirus software.
