fixed my stuff
This commit is contained in:
parent
5010901a32
commit
992157c88d
2 changed files with 7 additions and 2 deletions
|
@ -41,7 +41,7 @@ public:
|
|||
|
||||
void display()
|
||||
{
|
||||
cout<<"Atribute name:\t"<<name<<"\n";
|
||||
cout<<"Attribute name:\t"<< name <<"\n";
|
||||
cout<<"Elements: ";
|
||||
|
||||
for (int i = 0; i < values.size(); ++i)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
class Relation {
|
||||
string name; //The title the user gives it
|
||||
vector<Attribute> att; //A vector of the columns
|
||||
itn size;
|
||||
|
||||
public:
|
||||
Relation();
|
||||
|
@ -14,6 +15,7 @@ public:
|
|||
Relation(string n, vector<Attribute> a) {
|
||||
name = n;
|
||||
att = a;
|
||||
size = 0;
|
||||
}
|
||||
|
||||
void addTuple(vector<string> tuple) {
|
||||
|
@ -25,10 +27,13 @@ public:
|
|||
|
||||
//In this column, at this element's spot, assign an element from the tuple vector to this spot
|
||||
att[i].addRow(tuple[i]);
|
||||
size++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int getSize() { return size; }
|
||||
|
||||
string getTableName() {
|
||||
return name;
|
||||
}
|
||||
|
@ -57,4 +62,4 @@ public:
|
|||
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
Reference in a new issue