Aslickproductions.org/forum/index.php?PHPSESSID=so1iojs5ocdn0o2vf0tti7fbu6&topic=756.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index1942.htmlslickproductions.org/forum/index.php?PHPSESSID=so1iojs5ocdn0o2vf0tti7fbu6&board=16.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index1942.html.zxg^2lOKtext/htmlISO-8859-1gzip8:2lTue, 10 Mar 2020 20:32:25 GMT0 0Pg^2l C++ is retarded sometimes.

Author Topic: C++ is retarded sometimes.  (Read 3463 times)

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
C++ is retarded sometimes.
« on: August 22, 2008, 11:29:39 PM »
Apparently, using the stream operators produces results inconsistent with themselves.  If I open an ifstream, and use the >> operator to read from the stream into a char variable, the program reads two bytes, and puts the second one into the variable.  If, on the other hand, I open an ofstream, and use the << operator to output the contents of a char variable to a file, it outputs one byte.

 :lame:

In other news, I've managed to decode the RLE-compressed maps.  I need to finalize my own map format, and then I might actually be ready to do a map viewer.

I.S.T.

  • i doesnt no how 2 blits
  • *
  • Posts: 482
  • Gender: Female
  • Global Moderator
    • View Profile
Re: C++ is retarded sometimes.
« Reply #1 on: August 23, 2008, 11:03:01 AM »
Cool. :D

Jorgur

  • FF5 R&D Master
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: C++ is retarded sometimes.
« Reply #2 on: August 23, 2008, 02:30:46 PM »
I don't think the stream statements are native to C++...

Blame <iostream> :cycle:

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: C++ is retarded sometimes.
« Reply #3 on: August 24, 2008, 03:46:37 PM »
<iostream> is part of the C++ standard library.  I think the standard library, in comparison to Java and C#, is one of the biggest reasons for C++'s decline.

There are things you can do in C++ that you could never, ever do in Java or C#.  But there are a lot of things you can do very easily in Java and C# that are a pain in C++, and could be made easier if the langauge were updated.