作者查詢 / KangSuat
作者 KangSuat 在 PTT [ C_and_CPP ] 看板的留言(推文), 共50則
限定看板:C_and_CPP
看板排序:
全部Gossiping68659TW-language4088TW-history996historia880Tainan667marvel666WorldCup562Geography505joke267HatePolitics249Baseball101PublicIssue79IA64gallantry61C_and_CPP50Teacher46LMSH38WomenTalk38NTU37Salary37Tech_Job28Wanhua26Folklore25PingTung25Kaohsiung23CFantasy22L_TalkandCha21ToS20Malaysia18YOLO18C_Chat16Stock16specialman15MdnCNhistory14ChungLi13home-sale13sex13CrossStrait12movie12nCoV201912Boy-Girl11AfterPhD9AOE9clmusic9car8CVS8Examination8PublicServan8Steam8SMSlife7studyteacher7StupidClown7TPC_Police7Cruise6Doraemon6KOTDFansClub6TAKESHI6Aves5book5ChangHua5Chiayi5CYCU_Talk5Employee5Finance5forsale5Gov_owned5medstudent5MenTalk5Militarylife5MuscleBeach5TKU_EE_92C5Zastrology5DummyHistory4FCU_Talk4France4HK-movie4HsinTien4NightLife4PhD4rent-exp4RTS4SENIORHIGH4SouthPark4toberich4biker3CHING3Football3iOS3JapanHistory3KUAS3LAW3Marginalman3NCYU_Fst_983NetSecurity3Shu-Lin3ShuangHe3SongShan3T-I-R3TaichungBun3AllTogether2Anti-Cancer2battlegirlhs2China-Drama2ck53rd3022feminine_sex2FireEmblem2FJU2hakka2Hsinchu2kodomo2Lawyer2LoL2media-chaos2MGL-history2Miaoli2Military2NCKU2NCTU_TALK2Neihu2PokemonGO2Test2TypeMoon2Weyslii2WFSH2Zhongshan2About_Life1AirForce1Anchors1Anti-ramp1ask1Badminton1Bank_Service1Beauty1BigSanchung1Browsers1Cancer1CareerPlan1cat1CCRomance1China1Civil1DivingSport1FAPL1FFF1FORMULA11Germany1graduate1Hakka-Dream1Hearthstone1Hiking1HsinChuang1HSNU_8201Hualien1Hunter1I-Lan1India-movie1Japan_Travel1japanavgirls1Jinmen1juniorhigh1Keelung1kochikame1KS93-3021L_SecretGard1Lottery1marriage1MobileComm1mobilesales1Mongolia1MRT1NARUTO1NTHU_Talk1NTUCivilism1PlayStation1Post1PttLifeLaw1PttLogo1PunishRecord1rabbit1Railway1Rent_tao1Road_Running1ScienceNote1SET1Soft_Job1soul1speech1StarTrek1SurvivalGame1swim1SWORD1TaiwanDrama1Taiwanlit1teeth_salon1TigerBlue1ToS_Match1TWICE1Vietnam1Violation1Warfare1Wen-Shan1Windows1WorkinChina1YuanChuang1<< 收起看板(204)
首頁
上一頁
1
下一頁
尾頁
14F推: #include "stdafx.h"09/14 02:18
15F→: #include <iostream>09/14 02:19
16F→: #include <io.h>09/14 02:19
17F→: #include <fcntl.h>09/14 02:19
18F→: int wmain(int argc, wchar_t* argv[]){09/14 02:20
19F→: _setmode(_fileno(stdout), _O_U16TEXT);09/14 02:20
20F→: std::wcout << L"ληñÜΨЖばぞ "<< std::endl;09/14 02:25
21F→: getchar();//暫停09/14 02:26
22F→: return 0;09/14 02:26
23F→: }09/14 02:26
24F→: 中、日、英、法、德、西、義、丹麥、芬蘭、俄 可以印出09/14 02:28
25F→: 韓、泰、匈牙利、波蘭、阿拉伯、印度、希伯來 印不出來09/14 02:31
26F→: 希臘文 可以09/14 02:31
27F→: 我用Visual Studio跑這隻code,都沒有另外改環境XD09/14 02:34
28F→: 簡單好用!!!09/14 02:37
29F→: code輸出:ληñÜΨЖばぞ09/14 02:38
30F→: 字母的語系分別是:希希西德希俄日日09/14 02:40
31F→: 也不需要另外灌語系09/14 02:42
32F推: 如果想讀取Unicode的txt...09/22 23:01
33F→: #include "stdafx.h"09/22 23:01
34F→: #include <sstream>09/22 23:01
35F→: #include <fstream>09/22 23:02
36F→: #include <iostream>09/22 23:02
37F→: #include <io.h>09/22 23:02
38F→: #include <fcntl.h>09/22 23:02
39F→: #include <windows.h>09/22 23:03
40F→: int wmain(int argc, wchar_t* argv[]){09/22 23:04
41F→: FILE* fp;09/22 23:04
42F→: _wfopen_s(&fp, L"123.txt", L"r");09/22 23:05
43F→: _setmode(_fileno(fp), _O_U16TEXT);09/22 23:06
44F→: std::wifstream fs(fp);09/22 23:06
45F→: std::wstring aa;09/22 23:06
46F→: while (fs>>aa){09/22 23:07
47F→: std::wcout << aa << std::endl;09/22 23:07
48F→: }09/22 23:08
49F→: fclose(fp);09/22 23:08
50F→: getchar();//暫停09/22 23:08
51F→: return 0;09/22 23:09
52F→: }09/22 23:09
53F→: 這是一個詞一個詞讀進來(以空格切割一行中的每個詞)09/22 23:10
54F推: 如果std::wstring aa; 改用 wchar_t array[70];09/22 23:13
55F→: while (fs>>aa){ 改用 while(fs.getline(array, 70)){09/22 23:14
56F→: std::wcout << aa << std::endl; 改用09/22 23:14
57F→: std::wcout << array << std::endl;09/22 23:15
58F→: 就會一行一行讀進來,70表示你設定一行可讀70個字母09/22 23:16
59F推: 如果std::wstring aa; 改用 wchar_t aa;09/22 23:26
60F→: 一樣 while (fs>>aa){09/22 23:27
61F→: 一樣 std::wcout << aa << std::endl;09/22 23:27
62F→: 就會一個字母一個字母讀進來09/22 23:28
63F→: 以上兩隻都是在Visual Studio Ultimate 2013執行09/22 23:30
首頁
上一頁
1
下一頁
尾頁