当前位置:网站首页>Million data document access of course design
Million data document access of course design
2022-07-07 14:14:00 【sinat_ thirty-six million seven hundred and eighty-nine thousan】
Other types are converted to string type :
string to_string (int val);
string to_string (long val);
string to_string (long long val);
string to_string (unsigned val);
string to_string (unsigned long val);
string to_string (unsigned long long val);
string to_string (float val);
string to_string (double val);
string to_string (long double val);
c_str() yes Borland Packaged String A function in class , It returns the first character address of the current string . When you need to open a file with a file name entered by the user , It can be written like this :ifstream in(st.c_str())
Examples :
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
string a="outputdsaftttt.txt";
ofstream output( a.c_str(), ios::out);
if( ! output )
{
cerr << "Open output file error!" << endl;
exit( -1 );
}
output.close();
return 0;
}
边栏推荐
- Attribute keywords aliases, calculated, cardinality, ClientName
- mysql导入文件出现Data truncated for column ‘xxx’ at row 1的原因
- libSGM的horizontal_path_aggregation程序解读
- Seven propagation behaviors of transactions
- Leetcode simple question sharing (20)
- ndk初学习(一)
- Cesium knows the longitude and latitude of one point and the distance to find the longitude and latitude of another point
- Details of redis core data structure & new features of redis 6
- 【网络安全】sql注入语法汇总
- 648. Word replacement: the classic application of dictionary tree
猜你喜欢
常用数字信号编码之反向不归零码码、曼彻斯特编码、差分曼彻斯特编码
PERT图(工程网络图)
最长上升子序列模型 AcWing 1014. 登山
手把手教会:XML建模
118. Yanghui triangle
使用day.js让时间 (显示为几分钟前 几小时前 几天前 几个月前 )
Mathématiques avancées - - chapitre 8 différenciation des fonctions multivariables 1
SSRF vulnerability file pseudo protocol [netding Cup 2018] fakebook1
Codes de non - retour à zéro inversés, codes Manchester et codes Manchester différentiels couramment utilisés pour le codage des signaux numériques
Excerpt from "misogyny: female disgust in Japan"
随机推荐
Excuse me, I have three partitions in Kafka, and the flinksql task has written the join operation. How can I give the join operation alone
Vmware共享主机的有线网络IP地址
3D Detection: 3D Box和点云 快速可视化
Cesium 已知一点经纬度和距离求另一个点的经纬度
Cesium knows the longitude and latitude of one point and the distance to find the longitude and latitude of another point
The reason why data truncated for column 'xxx' at row 1 appears in the MySQL import file
带你掌握三层架构(建议收藏)
最长上升子序列模型 AcWing 1012. 友好城市
"New red flag Cup" desktop application creativity competition 2022
Redis 核心数据结构 & Redis 6 新特性详
FCOS3D label assignment
【日常训练】648. 单词替换
Oracle advanced (V) schema solution
Realization of search box effect [daily question]
Did login metamask
Laravel Form-builder使用
Interface automation test - solution of data dependency between interfaces
[Reading stereo matching papers] [III] ints
648. Word replacement: the classic application of dictionary tree
Evolution of customer service hotline of dewu