/* * student.h * * Created on: 21.03.2013 * Author: trifon */ #ifndef STUDENT_H_ #define STUDENT_H_ const int MAX_NAME = 100; class Student { private: int fn; // char name[MAX_NAME]; // <--- статично заделен низ char* name; // <--- динамично заделен низ double grade; public: Student(int = 0, char const* = "", double = 2); Student(Student const&); Student& operator=(Student const&); int getFN() const { return fn; } char const * getName() const { return name; } // ако е само char*: // !!! strcpy(s.getName(), "Хакнах те!"); double getGrade() const { return grade; } void print() const; void setName(char const* newName); ~Student(); }; #endif /* STUDENT_H_ */