C++ ---> HTML

Pages: 12
@chrisname:
That's rather stupid that a C++ function wouldn't take C++ types as arguments, don't you think? :/

-Albatross
No, I don't. std::fstream and std::string are separate libraries. A const char* is native, so it doesn't require a library to handle. That way, the libraries aren't inter-dependant.
+1 chris.
IMHO it was a bad design choice, but IIRC that is going to be fixed in C++0x
That's stupid. Now, to open a file, I have to include the string library too?
bad design? why? o.O
That's stupid. Now, to open a file, I have to include the string library too?
Nope, it will be included in fstream
bad design? why? o.O
Because C++ strings are std::string, not char arrays
that's why it has the method c_str(), is it still bad? so using containers like strings and vectors are bad design?
uh? I meant that was bad for file streams not taking a std::string as argument
i see.
They could have had an #ifdef #define #endif clause for adding string support to std::fstream.

It's neat to have separate libraries, but it's even neater to have libraries that work purfectly with each other, no?

-Albatross
They are both part of the standard library, not of separate libraries
+1 Bazzy
Chris:
No, I don't. std::fstream and std::string are separate libraries. A const char* is native, so it doesn't require a library to handle. That way, the libraries aren't inter-dependant.

Bazzy:
They are both part of the standard library, not of separate libraries


Well... I see you and chrisname need to have chat about that.

And I stand by my "it's even neater to have libraries that work purfectly with each other, no?"

-Albatross
Topic archived. No new replies allowed.
Pages: 12