Dev C++中string和char的一些問題及deprecated conversion from string constant to ‘char*’

最近在dev c++上寫字符串程序。遇到一些問題,string和char都是字符類型的。可是在dev裏面使用還有點差別。ios 關於string 首先,我先寫了這個代碼c++ #include<stdio.h> #include<string.h> int main(void) { string s = "hello"; printf("%s",s); return 0; } 而後報錯we
相關文章
相關標籤/搜索