本人原创文章,欢迎阅读,禁止转载。

 

这绝对是惊艳到让你眼前一亮(为了简洁,故意没考虑资源问题和编译警告)。

 

1 #include <iostream>
2 #include <fstream>
3 #include <string>
4 using namespace std;
5 int main(int argc,char* argv[])
6 {
7     cout<<string((istreambuf_iterator<char>(ifstream(__FILE__))),istreambuf_iterator<char>())<<endl;
8 }

 

本人原创文章,欢迎阅读,禁止转载。

相关文章:

  • 2021-11-17
  • 2022-01-18
  • 2021-09-20
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2022-03-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2021-05-30
  • 2022-01-29
  • 2021-05-19
相关资源
相似解决方案