Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

我可以告訴你,如何把 1000弄對

Posted by sjgau02 at 2004-11-03 12:36:02 on Problem 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator