How to disable automatic comment insertion in Vim? Add to ~/.vimrc: au FileType c,cpp setlocal comments-=:// comments+=f:// More: http://vim.wikia.com/wiki/Disable_automatic_comment_insertion
Tag: C++
Tutorials and tips on C++ language, libraries and techniques.
Are You Wanting to Learn a Programming Language? Read Before Your Make a Choice
Posted onMaking a career choice is difficult. And, if you have decided on becoming a programmer, the difficulty is just beginning. The most important thing is to first decide the language that you want to learn and this is often the most difficult decision. The good part is that you know you need to focus on
Read more
How to Configure the Latest Version of Flash on Firefox for Linux: by the Fresh Player Plugin
Posted onAs you may know, Adobe stopped supporting the NPAPI version of Flash on Linux and the latest NPAPI version of Flash player at version 11.2 released back in 2012 will only receive security fixes. Even the security fixes to the 11.2 version of the Flash Plugin your Firefox is using will end on May 4,
Read more
How to Get Available Filesystem Space on Linux: a C Function with a C++ Example
Posted onIt is common for programs to write to files in filesystems on disks. However, what if the disk was almost full when your program writes to the filesystem on a disk? For systems software and mission critical programs, it is a better or must-to-do practice to check the available filesystem space before actually writing to
Read more
RAII-like Error Handling and Resource Management in C
Posted onError handling and resource management are pervasive in programs. RAII originated in C++ is great. With RAII, it is much easier to write easy-to-read code that allocats/deallocats resources in the constructor/destructors. By representing a resource with a local object, we are sure that local object’s destructor will release the resource and will not forget to
Read more
Statically Linking C and C++ Programs on Linux with gcc
Posted onBefore statically linking you C and C++ programs, you should be aware of the drawbacks of the static linking especially with glibc. There are some good discussions already: with glibc you’re linking static programs which are not really static and some others here and here. That said, you can choose to statically link C and
Read more
OCaml Learning Materials
Posted onOCaml is an interesting functional language. There are lots learning materials on the Internet. I compile a list of resources for OCaml learning and reference. Recommended OCaml learning and reference material Online book of Real World OCaml by Yaron Minsky, Anil Madhavapeddy, Jason Hickey. A very good tutorial by Jason Hickey: http://www.cs.caltech.edu/courses/cs134/cs134b/book.pdf. The OCaml system
Read more