Magnus Westin

  • Content count

  • Joined

  • Last visited

Community Reputation

161 Neutral

About Magnus Westin

  • Rank
  1. Books :D

    I have read both, and while they basically take up the same information. I found C++ Primer Plus easier to read, but that is probably quite a personal preference   I thought it had a better "flow" to it, so I found it more enjoyable.
  2. Books :D

    The book I usually recommend is C++ Primer Plus by Stephen Prata. I think its a good book, that goes through all of C++. And its not written like a reference book, which makes it good for beginners also. One thing though, it doesn't talk about compilers and development environments. So if you want/need to learn that also, you need a book for that also (or just find tutorials on the web, plenty of those).
  3. Unity Program Concept Help Needed

    Yes, it would waste memory. One question though is, how much. What is the density of your solarsystems in a galaxy. If its really high, I would consider using a 3d array, since the wasted memory is quite small. And its a very easy thing to work with. If not, then take a look at octree's Also, depending on the size of your galaxy, you might even be able to use an array of solar systems, and just store the coordinates for each. Not very efficient, but if an galaxy only have say 50-100 solar systems, it wont matter, since looping through the array is going to be very fast anyway.
  4. I agree with renega, that if you want to create a simple application like that, you are better off with a higher level language. C# is good if you are on windows. That said, if you are doing this also to learn C++, I would use MFC if you don't care about crossplatform functionality. Otherwise use QT.   And if you really want to learn MS Windows programming, I would recommend using pure Win32 to do you application. It's going to be very slow to develop the first time you do this though. But understanding how things work on a lower level, will make you a much better programmer in the future, even when you are doing development in languages like C#.
  5. UTF-8 strings

    "where each character is the same size" is true for UTF-32. But Ive never come a cross a program that actually uses UTF-32. I would recommend reading the Wikipedia entries for UTF-8, UTF-16 and Unicode. They explain very well the difference and pro/cons of each encoding. As a side note to this topic does any one know of a unicode font that supports the whole range. Ive not been able to find one. Most only support UTF-16 without surrogates, ie only 2 bytes, not 4 byte characters.