End1??

This is a discussion on End1?? within the C++ Programming forums, part of the General Programming Boards category; Hi First of nice to meet all... Im just starting out in C++ as later on I would like to ...

  1. #1
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475

    End1??

    Hi First of nice to meet all...

    Im just starting out in C++ as later on I would like to program games.

    I have a few books, but nothing really good enough, so im using Cprograming.com instead to get the ins and outs of C++ first.

    I do have my first querry....

    I am using Dev C++ compiler and it works well, but in my books in says to put the statement:

    end1
    at the end of some text command lines.

    The only way I can get it to work without a compiler error is to delcare end one as:

    char end1;

    after the main() function. But in my book it says not to do this... is it my comiler being fussy or am i missing somthing??

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Did you include
    Code:
    using namespace std;

  3. #3
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475

    hi there

    yes i did include

    using namespace std;
    after the
    #include <iostream>

    but i still get the same error

  4. #4
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    *snickers*


    it's endl ..... end "el"

    also, like quantum said, use "using namespace std;" or, "using std::endl" or, "std::endl"
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

  5. #5
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    example
    Code:
    #include <iostream>
    
    using std::cout;
    using std::endl;
    
    int main()
    {
    	cout << "Test" << endl;
    	return 0;
    }

  6. #6
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475
    thanks snickers!! it was a real help

  7. #7
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475
    i have one more question guys...

    does the dev C++ compiler read the entire C++ language, as I have read on gamdev.net that there is not a compiler that does the whole languauge

  8. #8
    Registered User
    Join Date
    Aug 2003
    Posts
    1,205
    What I guess they meant was that no compiler comform to the whole standard, and no, no compiler is 100% standard compliant.
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  9. #9
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Compiler compliance & standard language limitations...

    Actually, the compiler that comes with DVD-C++ is quite good. Most of the popular compliers, including Microsoft Visual C++, and the borland compilers are also quite good.

    I've forgotten the details... I seem to remember that all of the top compilers are better than 97% compliant. (I read a Dr. Dobbs Journal article).

    However, this does not mean that any of these compilers can compile most "C++ programs"... because most real-world C++ programs contain non-standard code.

    The main reason for non-standard code is that there are no colors, fonts, graphics, sound, network/internet, USB/seriial/parallel, or mouse functions in ANSI/ISO standard C++. But, most compilers will have such functions. All of the compilers mentioned above include the Windows API library in addition to the standard C++ headers/libraries. So, they can make full Windows GUI programs with color, graphics, soiund, mouse, etc.

    The usual approach is to learn standard (boring text-based ) C++ first. Then move-on to the additional non-standard stuff.

    I have a few books, but nothing really good enough, so im using Cprograming.com instead to get the ins and outs of C++ first.
    The tutorials here are a good start, but they are quite limited. A good beginning book will contain much more information. For example, Teach Yourself C++ in 21 days by Jesse Liberty is over 700 pages. Accelerated C++ by Koenig & Moo is over 300 pages.

    My begining book was 21 Days. I liked it because it was easy to understand, and well organized for self-study with questions & exercises at the end of each "day" (chapter), and answers & solutions in the back. (Warning - Some people hate all of the 21 Days books.) I don't own Accelerated C+, but it is always highly recomended.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Template overloading?
    By cpjust in forum C++ Programming
    Replies: 5
    Last Post: 02-20-2008, 02:21 PM
  2. end1 error?
    By deedlit in forum C++ Programming
    Replies: 5
    Last Post: 09-09-2004, 07:25 PM
  3. Template specialization
    By CornedBee in forum C++ Programming
    Replies: 2
    Last Post: 11-25-2003, 01:02 AM
  4. Partial specialization of class template.
    By CornedBee in forum C++ Programming
    Replies: 4
    Last Post: 11-20-2003, 08:24 AM

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