> #include <iostream.h>
> int main()
> {
>         count << "Hello\n";
> }
>
>
> [EMAIL PROTECTED] kuliah]$ g++ coba.c -o coba
>
> In file included from /usr/include/c++/3.2/backward/iostream.h:31,
>                  from coba.c:1:
> /usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #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 <sstream> instead of the deprecated header <strstream.h>. To
> disable this warning use -Wno-deprecated.

Standard C++ saat ini untuk header tanpa menggunakan ekstensi ( .h), jadi
sebagaimana dijelaskan pada warning di atas, gunakan <iostream>, atau bila
ingin menghilangkan warning ini (not recomended) program harus dikompilasi
dengan menggunakan opsi -Wno-depreceated.

> coba.c: In function `int main()':
> coba.c:4: `count' undeclared (first use this function)
> coba.c:4: (Each undeclared identifier is reported only once for each
function
>    it appears in.)

count ??? Mungkin maksudnya cout ya ?
Standar C++, cout berada dalam namespace std, jadi anda harus menggunakan
namespace ini, sehingga program kamu jadi :

#include <iostream>
using namespace std;
int main()
{
    cout << "Hello\n";
    return 0;  // main mempunyai return value "int", jadi pastikan untuk
menulis "return ..."
}

atau

#include <iostream>
int main()
{
    std::cout << "Hello\n";
    return 0;  // main mempunyai return value "int", jadi pastikan untuk
menulis "return ..."
}



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 01/09/03


-- 
Berhenti langganan: [EMAIL PROTECTED]
Arsip dan info: http://linux.or.id/milis.php

Kirim email ke