-
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
-
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 :)
-
how about
Code:
#include <iostream.h>
int main()
{
return 0;
}
That works just fine for me.
-
>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
-
>>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?
-
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?
-
>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.