The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled C++ Code
Posted by: Billy | November 27, 2010 @ 12:21pm
C++ Code
[
Download
]
Matrix.cpp //#include <iostream> //#include <vector> //using namespace std; Matrix::Matrix (int n, int m) { Ni = n; Nj = m; } Matrix::fill() { for (int i=0; i<Ni; i++) { for (int j=0; j<Nj; j++) { M[i][j] = rand(); } } } Matrix.h #include <iostream> #include <vector> #include <cstdlib> #ifndef MATRIX_H #define MATRIX_H using namespace std; class Matrix { private: vector < vector<float> > M; int Ni, Nj; public: Matrix () {}; Matrix (int, int); void fill(); }; #endif TestMatrix.cpp #include "Matrix.h" int main() { cout << "hi" << endl; Matrix M (3, 1); //M.fill(); return 0; }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.53 / 8
34 Votes
http://codebin.yi.org/985
page generated in 0.00 seconds