只会 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

AI Hentai Generator
Generate AI Hentai for free.

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



PS "Loading" problems are caused by resource access or processing problems: hard disk reading speed is slow or bad: Use CrystalDiskInfo to check the hard disk health and replace the problematic hard disk. Insufficient memory: Upgrade memory to meet PS's needs for high-resolution images and complex layer processing. Graphics card drivers are outdated or corrupted: Update the drivers to optimize communication between the PS and the graphics card. File paths are too long or file names have special characters: use short paths and avoid special characters. PS's own problem: Reinstall or repair the PS installer.

A PS stuck on "Loading" when booting can be caused by various reasons: Disable corrupt or conflicting plugins. Delete or rename a corrupted configuration file. Close unnecessary programs or upgrade memory to avoid insufficient memory. Upgrade to a solid-state drive to speed up hard drive reading. Reinstalling PS to repair corrupt system files or installation package issues. View error information during the startup process of error log analysis.

"Loading" stuttering occurs when opening a file on PS. The reasons may include: too large or corrupted file, insufficient memory, slow hard disk speed, graphics card driver problems, PS version or plug-in conflicts. The solutions are: check file size and integrity, increase memory, upgrade hard disk, update graphics card driver, uninstall or disable suspicious plug-ins, and reinstall PS. This problem can be effectively solved by gradually checking and making good use of PS performance settings and developing good file management habits.

The article introduces the operation of MySQL database. First, you need to install a MySQL client, such as MySQLWorkbench or command line client. 1. Use the mysql-uroot-p command to connect to the server and log in with the root account password; 2. Use CREATEDATABASE to create a database, and USE select a database; 3. Use CREATETABLE to create a table, define fields and data types; 4. Use INSERTINTO to insert data, query data, update data by UPDATE, and delete data by DELETE. Only by mastering these steps, learning to deal with common problems and optimizing database performance can you use MySQL efficiently.

The key to feather control is to understand its gradual nature. PS itself does not provide the option to directly control the gradient curve, but you can flexibly adjust the radius and gradient softness by multiple feathering, matching masks, and fine selections to achieve a natural transition effect.

MySQL has a free community version and a paid enterprise version. The community version can be used and modified for free, but the support is limited and is suitable for applications with low stability requirements and strong technical capabilities. The Enterprise Edition provides comprehensive commercial support for applications that require a stable, reliable, high-performance database and willing to pay for support. Factors considered when choosing a version include application criticality, budgeting, and technical skills. There is no perfect option, only the most suitable option, and you need to choose carefully according to the specific situation.

MySQL performance optimization needs to start from three aspects: installation configuration, indexing and query optimization, monitoring and tuning. 1. After installation, you need to adjust the my.cnf file according to the server configuration, such as the innodb_buffer_pool_size parameter, and close query_cache_size; 2. Create a suitable index to avoid excessive indexes, and optimize query statements, such as using the EXPLAIN command to analyze the execution plan; 3. Use MySQL's own monitoring tool (SHOWPROCESSLIST, SHOWSTATUS) to monitor the database health, and regularly back up and organize the database. Only by continuously optimizing these steps can the performance of MySQL database be improved.

The loading interface of PS card may be caused by the software itself (file corruption or plug-in conflict), system environment (due driver or system files corruption), or hardware (hard disk corruption or memory stick failure). First check whether the computer resources are sufficient, close the background program and release memory and CPU resources. Fix PS installation or check for compatibility issues for plug-ins. Update or fallback to the PS version. Check the graphics card driver and update it, and run the system file check. If you troubleshoot the above problems, you can try hard disk detection and memory testing.
