1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <string>
using namespace std;
 
class Student {
private:
    string name;
    string telephone;
public:
    Student(const string n = "", const string t = "");
    string getTelephone() const;
    void setTelephone(const string t);
    string getname() const;
    void setName(const string n);
};
Student::Student(const string n = "", const string t = "") {
    name = n;
    telephone = t;
}
cs




이렇게 코드를 짰다고 했을때


name과 telephone이 string 자료형으로 선언되어있는데요


17,18번째 줄이 c언어로 따지면 strcpy(name,n) , strcpy(telephone,t) 와 같은건가요 ?