-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
区分C和C++? #1670
Comments
我觉得可以开个页面讲讲区别🤔 |
(我觉得不需要专门讲 C) |
同时似乎也没什么理由不专门讲 C |
绝大部分 OIer 都用 C++,没必要讲 C。 |
*绝大部分 OIer 都用 C with STL with iostream with (还有啥一下想不全了) |
绝大部分 OIer 不用的东西多着去了(比如 wsl,testlib,latex 等等),为什么别的讲了,C 不能讲呢 🤔 |
我觉得 testlib 和 latex 只是部分 OIer 不用的东西吧(不知道有没有大部分) 如果刚入门的也算,那应该是大部分了。 |
“如果有人愿意写的话,没什么理由拒绝这部分内容” 和我的论点不冲突,在当前不会对 Wiki 造成影响,我可以看做没有这句话吗( |
fine,我理解楼主是想问要不要讲讲区别,我的观点是可以,你说不需要,如果这没什么冲突的话倒也挺好 |
(那我重新表述一下我的观点吧) 可以但没必要专门写个页面讲 C 和 C++ 的区别。 在其它页面不要太过区分 C 和 C++。 |
我其实是这么想的,可以做一页讲一下主要的区别和陷阱(如new和free混用)。类似于“Pascal 急救转 C++ ”的页面定位。 |
我在我的PR里一块加了吧 |
说句题外话x,关于 new 和 free 的问题,我自己在写一些动态开点的数据结构的时候好像从来没 free 过内存(大雾)(把锅甩给操作系统) 另外,可以详细说一下 “new 和 free 混用的” 的问题吗? |
@Enter-tainer new和free混用可能会导致内存泄漏,我记得好像是用 |
想了下好像应该配套使用的是 new 和 delete?(记不到了,毕竟用的少) |
是的,new用delete,malloc用free |
想问下C语言在文档里的定位是啥?是和C++合并到一块,还是可以专门写个页面?C和C++还是有一定区别的
The text was updated successfully, but these errors were encountered: