第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

linux 用g++編譯c++代碼的問題?

linux 用g++編譯c++代碼的問題?

PHP
一只斗牛犬 2019-03-15 10:07:27
:~/c13.03/more$ g++ -o t t.cppt.cpp:12:0: 警告: “CLOCKS_PER_SEC”重定義 [默認(rèn)啟用]/usr/include/x86_64-linux-gnu/bits/time.h:49:0: 附注: 這是先前定義的位置t.cpp: 在函數(shù)‘int main(int, const char**)’中:t.cpp:32:111: 錯(cuò)誤: 對(duì)‘std::basic_ofstream<char>::open(std::basic_string<char>, std::_Ios_Openmode)’的調(diào)用沒有匹配的函數(shù)t.cpp:32:111: 附注: 備選是:/usr/include/c++/4.6/fstream:702:7: 附注: void std::basic_ofstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char, _Traits = std::char_traits<char>, std::ios_base::openmode = std::_Ios_Openmode]/usr/include/c++/4.6/fstream:702:7: 附注: no known conversion for argument 1 from ‘std::basic_string<char>’ to ‘const char*’我的源代碼出錯(cuò)的open函數(shù):fout.open("/home/wangwenyu/c13.03/more"+filename+".in",std::ofstream::out | std::ofstream::app);fout<<"title typical input stream"<<endl;
查看完整描述

3 回答

?
ibeautiful

TA貢獻(xiàn)1993條經(jīng)驗(yàn) 獲得超6個(gè)贊

#include<iostream>
#include<vector>
using std::cout;
using std::endl;
using std::vector;

int main()
{
vector<int> container;
for(int i=1;i<=4;i++)
container.push_back(i);
cout<<"here is what is in the container:\n";
vector<int>::iterator p;
for(p=container.begin();p!=container.end();p++)
cout<<*p<<" ";
cout<<endl;

cout<<"setting entries to 0:\n";
for(p=container.begin();p!=container.end();p++)
*p=0;

cout<<"contanier now contains:\n";
for(p=container.begin();p!=container.end();p++)
cout<<*p<<" ";
cout<<endl;
return 0;
}



查看完整回答
反對(duì) 回復(fù) 2019-03-30
  • 3 回答
  • 0 關(guān)注
  • 714 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)