質問するログイン新規登録

質問編集履歴

3

Personの綴りの誤植、ヘッダファイル名のはじまりを大文字にしました

2017/06/19 09:15

投稿

ain4425
ain4425

スコア19

title CHANGED
File without changes
body CHANGED
@@ -46,7 +46,7 @@
46
46
  ①makefile
47
47
  ②person_main.cpp
48
48
  ③person.cpp
49
- person.h
49
+ Person.h
50
50
  としています。
51
51
 
52
52
  --------------------------------------------------------
@@ -167,7 +167,7 @@
167
167
  void Show();//名前と評価の表示
168
168
  //コンストラクタ
169
169
  Person();//名前の設定→初期化
170
- Personv(string str, int q1_local, int q2_local, int q3_local, int q4_local);//長さ取得、代入
170
+ Person(string str, int q1_local, int q2_local, int q3_local, int q4_local);//長さ取得、代入
171
171
  string getname();//名前の取得(stringのメンバ)
172
172
  ~Person();
173
173
  };

2

ヘッダーファイルのstringについて修正しました

2017/06/19 09:15

投稿

ain4425
ain4425

スコア19

title CHANGED
File without changes
body CHANGED
@@ -154,6 +154,9 @@
154
154
  #ifndef PERSON_H_INCLUDED_
155
155
  #define PERSON_H_INCLUDED_
156
156
 
157
+ #include<string>
158
+ using namespace std;
159
+
157
160
  class Person{
158
161
  string name;
159
162
  int q1;

1

誤字

2017/06/19 09:03

投稿

ain4425
ain4425

スコア19

title CHANGED
File without changes
body CHANGED
@@ -74,7 +74,7 @@
74
74
 
75
75
 
76
76
  int main(){
77
- cout << "\n" << endl;
77
+ cout << "A~Dの評価を出力します\n" << endl;
78
78
  Person person[4]={//4人の評価を関連付け
79
79
  Person("A",5,3,4,3),
80
80
  Person("B",2,5,2,3),