someone explain to me

This is a discussion on someone explain to me within the C++ Programming forums, part of the General Programming Boards category; about the new standards in c++. I learned back in my day about <iostream.h> and other such fun files. now ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    18

    someone explain to me

    about the new standards in c++. I learned back in my day about <iostream.h> and other such fun files.

    now all they want to tell me is use namespace std... What the crap? Was it not working before??

    And why the push to strings by my school? Wern't character arrays good enough for them??

    Someone tell me bout the changing world of c++.

    cow
    cow

  2. #2
    Registered User biosx's Avatar
    Join Date
    Aug 2001
    Posts
    230
    Programmers, Engineers, Theorists, and Scientists love to standardize everything. They make the best choices for the language and say, "Ok everybody, learn this and you will be all on the same page".

    I think its great.

    The people who make the standards for programming languages (and/or software) are usually ANSI. They completed the ANSI standard for C++ in 1998 (I believe). With this they introduced the namespaces. In C++, you make re-program (or overload) pretty much everything so it can do something different than it usually does. The namespaces help tell the compiler what you are going to use (kind of like how function prototypes work).

    It's for your own good

    So always code:
    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
       return 0;
    }
    and get used to it

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    how about
    Code:
    #include <iostream.h>
    
    int main()
    {
       return 0;
    }
    That works just fine for me.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >That works just fine for me.
    That's old C++. It works now, but it's not guaranteed to work later if everyone decides that it's too old and kills it completely. iostream.h is to be considered deprecated with potential deletion.

    -Prelude
    My best code is written with the delete key.

  5. #5
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    >>That's old C++.

    What's the point of making a new syntax if it makes it harder to type (more = harder) and possibly a waste of time?

  6. #6
    Registered User Sekti's Avatar
    Join Date
    Feb 2002
    Posts
    163

    if...

    if they are getting rid of iostream what would you use for io maybe I'm just a retro kind of guy lol and use it can you explain what you would use?
    +++
    ++
    + Sekti
    ++
    +++

  7. #7
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    >What's the point of making a new syntax if it makes it harder to type (more = harder) and possibly a waste of time?

    .h = -2

    if you are just using one object (eg std::cout)

    std::=+5

    that works out at three extra characters.

    or if you don't want to type five characters before every standard objectt/function then

    using namespace std;

    is an extra 16 characters per file. Are you a slow typer?

    If the aim of programming languages was to reduce the amount of typing you had to do there wouldn't be much readable code and you wouldn't have many language features.

    >if they are getting rid of iostream what would you use for io maybe I'm just a retro kind of guy lol and use it can you explain what you would use?

    They're not.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can you explain these bitwise operations?
    By 6tr6tr in forum C++ Programming
    Replies: 6
    Last Post: 10-29-2008, 02:19 PM
  2. Please explain?
    By neo_phyte in forum C Programming
    Replies: 3
    Last Post: 08-25-2006, 06:23 AM
  3. Can someone explain to me what this code means
    By Shadow12345 in forum C++ Programming
    Replies: 3
    Last Post: 12-22-2002, 12:36 PM
  4. Replies: 4
    Last Post: 11-19-2002, 09:18 PM
  5. Can someone explain "extern" to me?
    By valar_king in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2001, 01:22 AM

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