|
|
|
|
# 1 |
|
הוסטסניון
|
[C++] צריך עזרה במשהו.
שלום,
אני משתמש בקומפיילר של Dev-C++ וכשאני מנסה את הדוגמאות שיש בכתובת הבאה : http://vlib.eitan.ac.il/cplusplus2/guide2-1.html זה תמיד מחזיר שגיאות. ואני פותח בתור C++ ולא C ככה שזה לא הבעיה. סתם לדוגמא ניסיתי להריץ את הקןד הבא: קוד:
#include <iostream.h>
int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!";
return 0;
}
קוד:
1 C:\Dev-Cpp\include\c++\3.4.2\backward\iostream.h:31, from C:\Documents and Settings\Elad-A\Desktop\New Folder\Untitled1.cpp In file included from C:/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31, from C:\Documents and Settings\Elad-A\Desktop\New Folder\Untitled1.cpp 1 C:\Documents and Settings\Elad-A\Desktop\New Folder\Untitled1.cpp from C:\Documents and Settings\Elad-A\Desktop\New Folder\Untitled1.cpp 32:2 C:\Dev-Cpp\include\c++\3.4.2\backward\backward_warning.h #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. אז מה הבעיה בקומפיילר או בקודים?
__________________
|
|
|
|
# 2 |
|
משתמש - היכל התהילה
|
ב"ה
זו לא שגיאה זו רק הערה. תנסה להריץ את התוכנית.
__________________
קו ישר, כי אפשר גם אחרת |
|
|
|
# 3 |
|
הוסטסניון
|
ניסיתי עוד משהו:
קוד:
#include <iostream.h>
int main()
{
char string[256]; //A nice long string
cout<<"Please enter a long string: ";
cin.getline(string, 256, '\n'); //The user input goes into string
cout<<"Your long string was:"<<endl<<string;
return 0;
}
__________________
|
|
|
|
# 4 |
|
חבר בקהילה
|
תוסיף בסוף הקוד איזה שורה שמחכה לקלט, או שתריץ את הקובץ דרך הCMD, כנראה שלא כל הקומפיילרים מחכים בסוף ההרצה.
|
|
![]() |
| חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|