| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
我可以告訴你,如何把 1000弄對In Reply To:Runtime Error 是怎么回事? Posted by:minidick at 2003-12-11 18:46:09 我可以告訴你,如何把 1000弄對。
Main.cpp
C:\temp\221789\Main.cpp(1) : fatal error C1083: Cannot open include file: 'stadf.h': No such file or directory
//你一定是使用 VC6
你 create 一個新的project, 請使用 empty case
以下的 code 是正確的
#include <iostream>
using namespace std;
void main()
{
int a,b;
cin >> a >> b;
cout << a+b << endl;
}// end of main()
// --------------------------------------------
//以下是解釋
#include <iostream>
//把 iostream 這個 header file, include 進來
using namespace std;
//這一行比較不好解釋,你先照抄
void main()
//主程式的開始,回傳的值,設定成為 null
{// 開始
int a,b;//宣告兩個 整數變數
cin >> a >> b;//從標準輸入,輸入兩個整數變數的值
cout << a+b << endl;//輸出到 標準輸出,endl 會讓程式跳行
}// 結束,end of main()
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator