
C | C++|Cython
...
ikeepo
https://ikeepo.github.io/
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Cython官方文档中文翻译
Cython Documentation尝试翻译Cython Documentation以助学习。水平有限,乐迎指正。本文是目录,每条目录有两部分内容:英文+中文(仅已翻译的有);其英文附有原来链接;中文附有中文文章链接。Cython project homepageGetting StartedCython - an overviewInstalling Cyt...原创 2019-12-19 15:28:07 · 1344 阅读 · 0 评论 -
初识SWIG
SWIGThe Simplified Wrapper and Interface Generator (SWIG) is an open-source software tool used to connect computer programs or libraries written in C or C++ with scripting languages such as Lua, Perl, PHP, Python, R, Ruby, Tcl, and other languages.The ..原创 2020-11-27 22:11:03 · 167 阅读 · 0 评论 -
C++实现可执行文件输入参数执行
Overview about command line parametersCommand-line parameters are passed to a program at runt-time by the OS when the program is requested by another program, such as a command interpreter ("shell") like cmd.exe on WIndows or bash on Linux and OS X.The..原创 2020-10-01 09:49:55 · 1944 阅读 · 0 评论 -
理解template In C++ :第一重
shared_ptrtemplate <class T> class shared_ptr;shared_ptr 定义如上,是一个template,具体应该怎么理解呢?templatewikipediacplusplusgeeksforgeekstutorialspointcppreferenceFrom wikipedia, Templates are a feature of the C++ programming language that allo..原创 2020-08-15 08:32:03 · 311 阅读 · 0 评论 -
理解std::shared_ptr In C++
std::shared_ptrDefined in header , which is part of the dynamic memory management library.Detail in could be found here.Dynamic memory managementThere are several parts on dynamic memory management: ***Smart pointers***, Allocators, Memory r..原创 2020-08-14 20:17:51 · 347 阅读 · 0 评论 -
理解static关键字 In C++:第一重
Static Keyword in C++Static is a keyword in C++ used to give special characteristics to an element. Static elements are allocated storage only once in a program lifetime in static storage area. And they have a scope till the program lifetime. Static k..原创 2020-08-14 20:17:04 · 461 阅读 · 0 评论 -
理解static storage area VS. stack VS. heap In C++
Static vs DynamicStatic : Storage can be made by compiler looking only at the text of the program. One reason for statically allocating as many data objects as possible is that the addresses of these objects can be compiled into target code.Dynamic :..原创 2020-08-14 20:16:29 · 381 阅读 · 0 评论 -
for循环的两种格式 In C++
for loop in C++A for loop is a repetition control structure that allows you to efficently write a loop that needs to execute a specific number of times.Syntaxnormalfor (init; condition; increment){ statement(s);}which can also expresse..原创 2020-08-14 20:12:22 · 1312 阅读 · 0 评论 -
C++中ndarray
ndarrayndarray并非C++原生概念,而是numpy概念。不过在C++中,可以通过*Boost.Python(NumPy)*创建ndarray类型。Boost.Python NumPyTutorialndarry library in C++githubndarray is a template library that provides multidimensional array obejcts in C++, with an interface ..原创 2020-08-14 20:11:33 · 1074 阅读 · 0 评论 -
在CentOS7使用rapidcsv.h在C++读写csv文件
rapidcsv.hgithubRapidcsv is a C++ header-only library for CSV parsing. While the name admittedly was inspired by the rapidjson project, the objectives are not the same. The goal of rapidcsv is to be an easy-to-use CSV library enabling rapid developme..原创 2020-08-13 20:59:58 · 909 阅读 · 0 评论 -
深入理解pointer in C++:第二重
OverviewDebate about pointers can stretch for miles, and you would need to go really far to master it all.What is a Pointer?Pointer is a variable that stores a memory address.A pointer is declared using the * operator before an identifier.As C..原创 2020-08-13 20:59:15 · 415 阅读 · 0 评论 -
理解Pointers In C++:第一重
Variable vs. Pointerint foo;int *foo_ptr = &foo;Grammatrically speaking, there is no such thing as a “pointer variable”: all variables are the same.There are, however, variables with different types. foo's type is int. foo_ptr's type is int *...原创 2020-08-13 20:58:03 · 387 阅读 · 0 评论 -
理解C++中STL与Standard Library
STLFrom wikipedia, the Standard Template Library (STL) is a software library for the C++ programming language that influenced many parts of the C++ Standard Library. It provides four components called:algorithmsA large number of algorithms to perf..原创 2020-08-13 20:56:56 · 453 阅读 · 0 评论 -
理解C++中header与library区别
问题描述From C++ references, is a library, but others are headers. What’s the difference between them.Difference between Header file and LibraryHeader filesThe files that tell the compiler how to call some functionality (without knowing how the fu..原创 2020-08-13 20:54:58 · 1139 阅读 · 0 评论 -
理解C++中array和vector of vectors
问题描述在C++中,array与vector of vectors 是否一致。array[123456789101112]\left[ \begin{matrix} 1&2&3&4\\ 5&6&7&8\\ 9&10&11&12 \end{matrix}\right]⎣⎡159261037114812⎦⎤vector of vectors[[1,2,3,4],[5,6,7,8],[9,10..原创 2020-08-13 20:55:16 · 753 阅读 · 0 评论 -
理解C++中#include <iostream>
#includeFrom 《C++ Library reference 概览》, include come from ‘algorithm -> merge -> includes’.From geeksforgeeks, #include is a way of including a standard or user-defined file in the program and is mostly written at the beginning of any C/C++ pr..原创 2020-08-13 20:55:30 · 5601 阅读 · 0 评论 -
理解C++各种后缀文件名.c, .cc, .cpp, .h, .o, .lib ...
.cc|.cpp|.c++|.cp|.cxx|.C|.CPPGNU GCC recognises all of they as C++ files, and will use C++ compilation regardless of whether you invoke it through gcc or g++..c vs. .C.C is a C++ file, but .c is a C file..cpp VS .cccc = C with classescpp..原创 2020-08-12 22:18:56 · 4454 阅读 · 0 评论 -
理解boost in C++ : 第一层
boost(boost.org)From wikipedia, Boost is a set of libraries for the C++ programming language that provides support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, ..原创 2020-08-12 22:18:00 · 614 阅读 · 0 评论 -
gcc如何查找头文件(查找路径)
摘要search path.How does gcc find the header filescommond`gcc -print-prog-name=cc1plus` -vThis command asks gcc which C++ preprocessor it is using, and then asks that preprocessor where it looks for includes.Tell the gcc to go the the dict..原创 2020-08-12 22:14:31 · 1450 阅读 · 0 评论 -
CentOS中C++的header头文件在哪个目录
OverviewPartly by convention and partly by design, C programs are split into source files that describe the functionality of the program itself and header files that describe how to invoke that functionality from other source files.Locationheade..原创 2020-08-12 22:13:37 · 1338 阅读 · 0 评论 -
C++如何创建对角矩阵
问题描述如题所述解决方案#define SIZE 3int eye[SIZE][SIZE] = {0};int main() { for (int i = 0; i < SIZE ; ++i) { eye[i][i] = 1; }}ReferencesInitialize an “eye” (identity) matrix array in C原创 2020-08-12 22:12:56 · 1816 阅读 · 0 评论 -
C++ Library reference 概览
STL vs. C++ Standard Library区别详情参见《理解C++中STL与Standard Library》Standard C++ Library referencecplusplusC LibraryThe elements of the C language library are also included as a subset of the C++ Standard Library. These cover many aspects, from ..原创 2020-08-12 22:12:12 · 1140 阅读 · 0 评论 -
Bjarne Stroustrup谈C++
摘要作为C++发明人,*Bjarne Stroupstrup*在个人网站上谈了不少对C++的思考。详细阅读,摘录部分如下。What is C++C++ is a general-purpose programming language with a bias towards systems programming thatis a better Csupports data abstractionsupports object-oriented programmingsuppor..原创 2020-08-12 22:11:04 · 577 阅读 · 0 评论 -
(20200714已解决)error: expected unqualified-id before ‘for’
问题描述如题所示#include <iostream>using namespace std;vector<vector<int>> matrix(n, std::vector<int>(n));for ( size_t i = 0; i < n; ++i ){ matrix[i][i] = 1;}解决方案for循环在函数体外#include <iostream>using namespace std;..原创 2020-08-12 22:07:55 · 15912 阅读 · 0 评论 -
C++学习系列七:Type conversions||Exceptions||Preprocessor directives
Type conversionImplicit conversionImplicit conversions are automatically performed when a value is copied to a compatible type.short a = 2000;int b;b = a;The value of a is promoted from short to int without the need of any explicit operator. T..原创 2020-07-13 21:38:01 · 451 阅读 · 0 评论 -
C++学习系列六:Classes(II)||overload operator||this||static members||const member functions||special membe
Overloading operatorsClasses, essentially, define new types to be used in C++ code. And types in C++ not only interact with code by means of constructions and assignments. They also interact by means of operators. For example, take the following opera..原创 2020-07-12 20:28:01 · 619 阅读 · 0 评论 -
C++学习系列五:Classes(I)||uniform initialixzation||Pointers||struct||union
Classes(I)Classes are an expanded concept of data structures : like data structures, they can contain data members, but they can also contain funcitons as members.An object is an instantiation of a class. In terms of variables, a class would be the typ..原创 2020-07-12 20:25:20 · 389 阅读 · 0 评论 -
C++学习系列四:Arrays||Character sequences||Poiters||Dynamic Memory||Data Structures||Other data types
ArraysAn array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.That means that, for example, five values of type int can be declared as an ar..原创 2020-07-12 20:22:37 · 535 阅读 · 0 评论 -
C++学习系列三:Statements and Flow Control||Functions||Overloads and Templates||Name Visibility
Statements and flow controlA simple C++ statement is each of the individual instructions of a program, always end with a semicolon(????, and are executed in the same order in which they appear in a program.Selection Statements: if and elseThe if keywo原创 2020-07-12 20:19:37 · 606 阅读 · 0 评论 -
C++学习系列二:Operators||Basic Input/Output
OperatorsAssignment operator(=)The assignment operator assigns a value to a variable.Assignment operations are expressions that can be evaluated. That means that the assignment itself has a value, and - for fundamental types - this value is the one ..原创 2020-07-12 20:17:26 · 731 阅读 · 0 评论 -
C++学习系列一:Compiler||Structure||Variables||Types||Constants
CompilersComputers understand only one language and that language consists of sets of instructions made of ones and zeros.This computer language is appropritely called machine language.A single instruction to a computer could look like this:A partic..原创 2020-07-12 20:14:09 · 489 阅读 · 0 评论 -
新手如何在CentOS7中C++使用jsoncpp
JSONJSON(JavaScript Object Notation)JSON is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.JSON is a text format that is completely language independent but uses conventi..原创 2020-07-12 10:13:20 · 1720 阅读 · 0 评论 -
理解Linux||C++中build system
OverviewWikipedia : Build automationBuild automation is the process of automating the creation of a software build and the associated processes including :compiling computer source code into bianry codepackaging binary coderunning automated tests..原创 2020-07-12 10:02:28 · 609 阅读 · 0 评论 -
理解gcc||g++||C11等版本问题
C++11(wikipedia)时间版本1998C++98ISO/IEC 14882:19982003C++03ISO/IEC 14882:20032011C++11(C++0x)ISO/IEC 14882:20112014C++14ISO/IEC 14882:2014C++11 是C++语言的一个标准。GCChttps://gcc.gnu.org/安装gcc最方便的方式是通过:sudo yum install centos..原创 2020-07-12 10:01:29 · 661 阅读 · 0 评论 -
理解g++、GCC、GDB、GNU以及各种后缀
language translateThere are 4 phases for a Program to finally get translated into an executable file viz:Preprocessing : It expands the code (For example - expansion of macros, removal of comments and conditional compilation)Compilation : Translates ..原创 2020-07-11 20:53:38 · 1405 阅读 · 0 评论 -
理解Compiling and Linking in C++
前言The compilation is the process which convert the program written in human readable language like C, C++ etc into a machine code, directly understood by the Central Processing Unit.There are many stages involved in creating a executable file from the ..原创 2020-07-11 20:51:38 · 763 阅读 · 0 评论 -
理解C++中的vcpkg是什么怎么用
vcpkggithubwikipedia知乎问题 : 如何看待Windows的C++包管理器vcpkg中文总览vcpkg was first announced at CppCon 2016.原创 2020-07-11 20:50:31 · 841 阅读 · 0 评论 -
centos-release-scl和devtoolset-7-gcc*是什么
centos-release-sclIn order to gain access to SCLs for CentOS, you need to install the CentOS Linux Software release file. It is part of the CentOS Extras repository and can be installed with this command:yum install centos-release-sclSCLFrom wikip..原创 2020-07-11 20:47:47 · 1966 阅读 · 0 评论 -
理解C++中花括号{}的作用
前言{} 在C++中功能较多,笼统来讲,功能起源是“变量初始化”,其用于汇总函数statements,也可以抽象理解为对函数这个变量的初始化。功能案例Functionsvoid myfunction(datatype argument) { // any statement(s)}Loopswhile (boolean expression) { // any statement(s)}do { // any statement(s)} while (bo..原创 2020-07-11 20:44:03 · 5025 阅读 · 1 评论 -
C语言学习笔记9(自动变量|数组定义|容器|集成初始化|下标|sizeof)
函数1没有参数时void f(void):确定函数不需要参数void f():不确定函数需要什么参数进行函数声明时,括号内尽量明确,哪怕什么也没有。mainreturn 0表示正常运行本地变量又称为局部变量、自动变量(生存期是自动的)。生存期开始出现到消失的周期。作用域起作用的领域。块大括号内的代码称为块。数组2int main(...原创 2020-01-09 19:54:17 · 463 阅读 · 0 评论