Guest User

Untitled

a guest
Nov 15th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<string> // 請注意在DEV C++中只接受#include<string.h>,因此DEV C++中不需要這一行
  2. #include<string.h> // 在Visual Studio使用#include<string>
  3. #include<iostream> // printf()
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. // 字串的宣告
  9. string myString = "abc";
  10. // 印出字串(請注意語法)
  11. printf("%s\n", &myString[0]);
  12. }
Add Comment
Please, Sign In to add comment