Skip to content

Instantly share code, notes, and snippets.

@vvondra
Created December 18, 2012 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvondra/4327098 to your computer and use it in GitHub Desktop.
Save vvondra/4327098 to your computer and use it in GitHub Desktop.
#include <ostream>
#include <sstream>
#include <iostream>
#include <vector>
class Matice {
public:
void pridej_sloupec(int a) {
}
void pridej_radek(int a) {
bunky.
}
std::size_t pocet_sloupcu() const {
return h_;
}
std::size_t pocet_radku() const {
return v_;
}
const int bunka(int i, int j) const {
return bunky[h_ * i + j];
}
int & bunka(int i, int j) {
return bunky[h_ * i + j];
}
private:
std::vector<int> bunky;
std::size_t h_;
std::size_t v_;
};
void nacti(Matice & m, std::istringstream & s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment