当前位置:网站首页>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;
}
边栏推荐
- oracle 触发器实现级联更新
- Es log error appreciation -limit of total fields
- [AI practice] Application xgboost Xgbregressor builds air quality prediction model (II)
- Verilog implementation of a simple legv8 processor [4] [explanation of basic knowledge and module design of single cycle implementation]
- 常用數字信號編碼之反向不歸零碼碼、曼徹斯特編碼、差分曼徹斯特編碼
- [high frequency interview questions] difficulty 2.5/5, simple combination of DFS trie template level application questions
- ndk初学习(一)
- FC连接数据库,一定要使用自定义域名才能在外面访问吗?
- Leecode3. Longest substring without repeated characters
- FCOS3D label assignment
猜你喜欢
Vmware共享主机的有线网络IP地址
. Net core about redis pipeline and transactions
AI人才培育新思路,这场直播有你关心的
Battle Atlas: 12 scenarios detailing the requirements for container safety construction
UML 顺序图(时序图)
Flask session forged hctf admin
libSGM的horizontal_path_aggregation程序解读
UML sequence diagram (sequence diagram)
Horizontal of libsgm_ path_ Interpretation of aggregation program
2022-7-7 Leetcode 844. Compare strings with backspace
随机推荐
CSMA/CD 载波监听多点接入/碰撞检测协议
Is it safe to open an account online now? Which securities company should I choose to open an account online?
THINKPHP框架的优秀开源系统推荐
Environment configuration of lavarel env
2022-7-6 Leetcode27. Remove the element - I haven't done the problem for a long time. It's such an embarrassing day for double pointers
UML 顺序图(时序图)
648. Word replacement: the classic application of dictionary tree
What are the principles for distinguishing the security objectives and implementation methods that cloud computing security expansion requires to focus on?
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
Common response status codes
mysql ”Invalid use of null value“ 解决方法
供应链供需预估-[时间序列]
接口自动化测试-接口间数据依赖问题解决
现在网上开户安全么?那么网上开户选哪个证券公司?
Mathématiques avancées - - chapitre 8 différenciation des fonctions multivariables 1
Leecode3. Longest substring without repeated characters
Excerpt from "misogyny: female disgust in Japan"
IP and long integer interchange
请问,redis没有消费消息,都在redis里堆着是怎么回事?用的是cerely 。
Vmware 与主机之间传输文件