Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
436 B
0
Indexable
Never
#include <iostream>
#include <vector>
using namespace std;
class schooler {
private:
    string name;
    vector<int> marks;
public:
    void addmark(int a) {
        marks.push_back(a);
    }
    void printMarks() {
        for (int i; i < marks.size(); i++) {
            cout << marks[i];
        }
    }
};
int main()
{
    string name;
    schooler Arthur;
    Arthur.addmark(5);
    Arthur.printMarks();
}