User Tools

Site Tools


docs:c_basics

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== C++ Basics ====== C++ is an object-oriented language. You can define new data types and their operations and then program with them much as you program with fundamental types such as %%int, char, float,%% etc. For example, you can define %%Matrix%% and %%Vector%% types and then write high-level linear algebra programs, like Matlab scripts. For example, <code c++> int N = 10; Matrix A(N,N); // Construct a matrix A Vector x(N); // Construct a vector x // ...fill in values of A and x... Vector y = A*x; // Multiply A*x and then set y = A*x // Print the results cout << "y's dimension is " << y.dim() << endl; cout << "y's value is " << y << endl; </code>

docs/c_basics.1234797106.txt.gz · Last modified: 2009/02/16 07:11 by gibson