Re: error while cout command compiling

Discussion in 'C Programming' started by ehab, Jul 7, 2003.

  1. ehab

    ehab Guest

    Those are my trials and after each trial I found error message .


    Trial #1:
    --------
    #include <iostream>
    /*using namespace std;
    int main() {*/
    int main(int argc, char **argv) {
    /*std::cout<<"hello world"<<std::end1;
    cout<<"hello world"<<end1;*/
    cout << argv[1] << end1;
    }


    stupid.cpp: In function `int main(int, char**)':
    stupid.cpp:7: `cout' undeclared (first use this function)
    stupid.cpp:7: (Each undeclared identifier is reported only once for each
    function it appears in.)
    stupid.cpp:7: `end1' undeclared (first use this function)

    Trial #2:
    --------
    #include <iostream>
    using namespace std;
    int main() {
    //std::cout<<"hello world"<<std::end1;
    cout << "hello world" << end1;
    }


    stupid2.cpp: In function `int main()':
    stupid2.cpp:5: `end1' undeclared (first use this function)
    stupid2.cpp:5: (Each undeclared identifier is reported only once for each
    function it appears in.)


    Trial #3:
    --------
    #include <iostream>
    int main() {
    std::cout << "hello world" <<std::end1;
    }



    stupid3.cpp: In function `int main()':
    stupid3.cpp:3: `end1' undeclared in namespace `std'
     
    ehab, Jul 7, 2003
    #1
    1. Advertising

  2. In gnu.gcc.help ehab <> wrote:
    > Trial #2:
    > --------
    > #include <iostream>
    > using namespace std;
    > int main() {
    > //std::cout<<"hello world"<<std::end1;
    > cout << "hello world" << end1;
    > }
    >
    >
    > stupid2.cpp: In function `int main()':
    > stupid2.cpp:5: `end1' undeclared (first use this function)


    It has come up in this thread, but you seem to ignore it:

    It is 'endl', not 'end1'. The last letter is 'ELL', not 'ONE'.

    Andre'

    --
    Those who desire to give up Freedom in order to gain Security, will not have,
    nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
     
    =?iso-8859-1?Q?Andr=E9_P=F6nitz?=, Jul 7, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. abi

    man cout or info cout

    abi, Jun 27, 2003, in forum: C++
    Replies:
    2
    Views:
    1,661
  2. ehab
    Replies:
    3
    Views:
    381
    Rolf Magnus
    Jul 7, 2003
  3. Pmb

    std::cout vs cout

    Pmb, Jun 2, 2004, in forum: C++
    Replies:
    2
    Views:
    4,428
    Leor Zolman
    Jun 2, 2004
  4. ehab

    Re: error while cout command compiling

    ehab, Jul 6, 2003, in forum: C Programming
    Replies:
    3
    Views:
    5,204
    Rolf Magnus
    Jul 7, 2003
  5. ehab

    Re: error while cout command compiling

    ehab, Jul 7, 2003, in forum: C Programming
    Replies:
    2
    Views:
    292
    Dave Steffen
    Jul 9, 2003
Loading...

Share This Page