Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //classes.h//
- class Geometry
- {
- private:
- vector < vector < double > > lambda_bb;
- public:
- void AllocateMemory(int Mx, int My);
- };
- class Polar : public Geometry
- {
- public:
- void PolarMemory(int Mx, int My);
- void UpdateVolume(int Mx,int My);
- Polar(int Mx, int My) {
- }
- void (int x, int y);
- private:
- vector < vector < double > > volume;
- };
- //classes.cpp//
- #include "classes.h"
- void Geometry::AllocateMemory(int x, int y) {
- lambda_bb.assign(x+2, vector<double>(y+2, 0));
- };
- void Polar::PolarMemory(int Mx, int My){
- lambda_bb.assign(x+2, vector<double>(y+2, 0));
- };
- void Polar::UpdateVolume(int Mx,int My) {
- int delta_h = 1;
- for (int i = 1; i < Mx + 1; ++i) {
- for (int j = 1; j < My + 1; ++j) {
- volume[i][j] = 0.5*My*(i *i - (i - 1) * (i - 1))*delta_h;
- }
- }
- }
- //main.cpp//
- #include "classes.h"
- if (key == "polar") {
- Polar::Geometry polar;
- polar.SetNumberOfLayers(Mx, My);//ошибка
- }
Add Comment
Please, Sign In to add comment