[問題] vc2010標頭檔

看板C_and_CPP (C/C++)作者 (小歐肥不肥)時間14年前 (2011/10/19 02:55), 編輯推噓0(004)
留言4則, 2人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) vc++2010 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) no 問題(Question): 我照書本上的輸入程式 但出現了以下情況 警告 1warning C4627: '#include <iostream>': 尋找先行編譯標頭使用時略過 c:\users\jamesemaj\documents\visual studio2010\projects\c++practice\c++practice\c++practice.cpp 4 1 c++practice 以及 警告 2warning C4627: '#include <iomanip>': 尋找先行編譯標頭使用時略過 c:\users\jamesemaj\documents\visual studio 2010\projects\c++practice\c++practice\c++practice.cpp 5 1 c++practice 請問各位哪裡出了問題呢 我是學C++的新手 問得太蠢別鞭我 感謝各位 餵入的資料(Input): 程式碼(Code):(請善用置底文網頁, 記得排版) #include <iostream> #include <iomanip> using namespace std; int main(void) { float f; double d; f=1.23556987f; d=1.23556987556265; cout <<"effect number characters"<<endl; cout <<"float f="<<setprecision(10)<<f<<endl; cout <<"double d="<<setprecision(19)<<d<<endl; f=1e36f; d=1e307; cout <<endl<<"exponent"<<endl; cout <<"setiosflags"(ios::scientific); cout <<"float f="<<f<<endl; cout <<"double d="<<d<<endl; system("pause"); return 0; } 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.57.134.31

10/19 02:57, , 1F
在最前面加個 #include "stdafx.h"
10/19 02:57, 1F

10/19 02:57, , 2F
或者重新建立一個空專案
10/19 02:57, 2F

10/19 03:00, , 3F
開了空專案沒出現東西耶
10/19 03:00, 3F

10/19 03:02, , 4F
開空專案的話你就要自己新增.cpp檔
10/19 03:02, 4F
文章代碼(AID): #1EdSkSKf (C_and_CPP)
文章代碼(AID): #1EdSkSKf (C_and_CPP)