我有一个大文本文件(~100MB),我将它的行保存在字符串列表中.我的Winform偶尔需要显示它的一部分,例如500,000行.
我尝试使用ListBox,RichTextBox和TextBox,但绘图花费了太多时间.
例如,TextBox需要25秒才能显示500,000行,而记事本会立即打开此大小的文本文件.
什么是最快的解决方案?
我已经尝试过了:
g++ -std=c++11 my_file.cpp -o my_prog
g++ -std=c++0x ...
g++ -std=gnu++0x ...
Run Code Online (Sandbox Code Playgroud)
我一直收到这条消息:
error: unrecognized command line option
Run Code Online (Sandbox Code Playgroud) 我在这里用C#得到了一个非常奇怪的行为:
float num = 144771463f;
// num is 144771456.0
Run Code Online (Sandbox Code Playgroud)
我也试过了
float num = Convert.ToSingle(144771463f);
// num is still 144771456.0
Run Code Online (Sandbox Code Playgroud)
为什么会这样?
c# ×2
c++11 ×1
compilation ×1
g++ ×1
large-files ×1
notepad ×1
redhat ×1
textbox ×1
winforms ×1