DAMN ErRoRS

This is a discussion on DAMN ErRoRS within the C++ Programming forums, part of the General Programming Boards category; Well I was reading a tuturail and the tuterial said write a little code on the complier so I did ...

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    69

    Angry DAMN ErRoRS

    Well I was reading a tuturail and the tuterial said write a little code on the complier so I did this is the code:
    ==========================================
    //Listing 2.2 using cout

    #include <iostream.h>
    int main()
    {
    cout <<"Hello there.\n";
    cout <<"Here is 5: "<< 5 <<"\n";
    cout <<"The manipulator endl writes a new line to the screen."<<
    ¬endl;
    cout <<"Here is a very big number:\t" <<70000 <<endl;
    cout <<"Here is the sum of 8 and 5:\t" << 8+5 <<endl;
    cout <<"Heres a fraction:\t\t" << (float) 5/8 << endl;
    cout <<"And a very very big number:\t" <<(double) 7000 * 7000 <<
    ¬endl;
    cout <<"Don't forget to replace Musicdip with your name...\n";
    cout <<"Musicdip is a C++ programmer after the third day!\n";
    return 0;
    }

    =========================================
    Well Here are the Errors

    --------------------Configuration: 21 - Win32 Debug--------------------
    Compiling...
    21days.cpp
    C:\Program Files\Microsoft Visual Studio\MyProjects\21\21days.cpp(9) : error C2018: unknown character '0xc2'
    C:\Program Files\Microsoft Visual Studio\MyProjects\21\21days.cpp(14) : error C2018: unknown character '0xc2'
    Error executing cl.exe.

    21.exe - 2 error(s), 0 warning(s)
    =========================================
    Im not sure if I made a mistake maybe added extra spaces or didnt add spaces where it needs to be...

    What are your thoughts on this?
    =========================================

  2. #2
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    #include <iostream>
    int main()
    {

    using std::cout;
    using std::endl;
    cout <<"Hello there.\n";
    cout <<"Here is 5: 5 \n";
    cout <<"The manipulator endl writes a new line to the screen."<<
    endl;
    cout <<"Here is a very big number:\t 70000 " <<endl;
    cout <<"Here is the sum of 8 and 5:\t" << (int)8+5 <<endl;
    cout <<"Heres a fraction:\t\t" << (float)5/8 << endl;
    cout <<"And a very very big number:\t" <<(double) 7000 * 7000 << endl;
    cout <<"Don't forget to replace Musicdip with your name...\n";
    cout <<"Musicdip is a C++ programmer after the third day!\n";
    return 0;
    }

  3. #3
    Registered User
    Join Date
    Jun 2002
    Posts
    69
    WOW you made it work but HOW????? Was mine wrong? If it was what did I do wrong?? Thanks again.

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    Where are u getting this from: ¬endl;

    DO NOT PUT THAT ¬ IN FRONT
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    > Where are u getting this from: ¬endl;
    1. Finger trouble

    2. copy/pasting nicely formatted code from html/pdf/word documents, which occasionally have funny chars which look nice on screen, but which are not valid source code characters.

  6. #6
    Registered User
    Join Date
    Jun 2002
    Posts
    69
    I dont know I got ¬endl; from Sam's teach your self C++ in 21 days book and I just typed what it said. I have no C++ knolage whatso ever YET.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. global namespace errors
    By stubaan in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 03:11 PM
  2. errors in my class....
    By o0obruceleeo0o in forum C++ Programming
    Replies: 9
    Last Post: 04-14-2003, 03:22 AM
  3. executing errors
    By s0ul2squeeze in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2002, 12:43 PM
  4. Damn Management!
    By Govtcheez in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 09-06-2001, 04:39 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21