#include<iostream> #include<string> using namespace std; class Hello{ public: void func(string name){ cout << "Hello World!\n"; cout << "It's << name << "!\n"; } }; int main(){ Hello hobj; hobj.func("山田"); return 0; }
Hello World!
It's 山田!
授業中に作成したプログラムを片っ端から乗っけていきです。C++ を中心に掲載中。
#include<iostream> #include<string> using namespace std; class Hello{ public: void func(string name){ cout << "Hello World!\n"; cout << "It's << name << "!\n"; } }; int main(){ Hello hobj; hobj.func("山田"); return 0; }
このページへのコメント
I3kLaC wow, awesome blog.Really thank you! Really Great.