Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

469 Neutral

About jdhardy

  • Rank
    Advanced Member

Personal Information


  • Twitter
  • Github

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. If you're using it as a scripting system internal to your game, then it will run on just fine on any desktop OS. If the scripts need to interact with the OS (opening files, etc.) then there are a few issues on non-Windows systems, but nothing major.   Non-desktop OSes (iOS, Android, WinPhone, Win8) are not yet supported. Getting the core to work on them wouldn't be that hard (except iOS, which doesn't allow runtime code generation), it just takes time.
  2. Quote:Original post by utilae ostringstream g_StrStream;//string stream What are the differences between the three and which do I need? i = input o = output no prefix = both You need an istringstream (or a stringstream), which uses a string as the source: istringstream iss("5"); int five; iss>>five; Or, with boost::lexical_cast: #include <boost/lexical_cast.hpp> int five = boost::lexical_cast<int>("5");
  3. Quote:Original post by cnstrnd To follow on this particular subject : How can one be sure the virtual functions in the v-table are ordered the same by different compilers ? You can't, but in practice, they usually are. Multiple or virtual inheritance isn't as likely to work, however. As long as you use interfaces with no base classes and only virtual functions, and the member function parameters are interfaces or primitive types, you should be OK. This is basically a cheap version of COM. Pretty much every Windows compiler uses the same vtable layout for this reason - compatibilty with COM interfaces. On other platforms you only have one compiler to worry about, so it doesn't really matter.
  4. jdhardy

    std::list speed issue?

    Quote:Original post by Driv3MeFar Quote:Original post by SiCrane Iterating through a list is actually very slow. In order to go through the list you need to dereference the next pointer of each node. This causes the cache to turn into mush. You may want to consider a std::vector or std::deque instead. They both have better cache locality than a std::list. Just out of curiosity, if the std::deque in non-contiguous in memory, how is it faster to iterate through than a linked list? Does it try to be as contiguous as possible, or is it just STL magic? A deque is an array of arrays. Each chunk is contiguous, but the chunks are not contiguous with each other. The locality is still better than a list, but not as good as a vector.
  5. jdhardy

    Vista w/o DVD Burner?

    Quote:Original post by KulSeran You can however boot off the disk if you have a virutal computer that can see the disk. Thus, if you get a copy of VMWare or a similar program, you can run that from inside your regular OS, and then boot the virtual ISO drive inside VMWare and test your OS there. I'd just like to add that this works great with the free VMWare Player - just use www.easyvmx.com to generate the VMX file.
  6. It works for me (well, as well as any other intellisense) on VS 2005 EE. Try deleting the .ncb file for your project/solution (close the IDE, delete the file, and reopen the IDE). C++ is really nasty to parse, and "simple" errors can hose the intellisense database (the ncb file).
  7. Don't use those functions, because they're unsafe? IF you feel like living on the edge, disable warning 4996: Project->Properties->C/C++->Advanced->Disable specific warnings EDIT: Wait, string.h class? If you're using C++ and you want the C string functions (strncat, strncmp et al.) use #include <cstring>; if you want the C++ std::string class, use #include <string>. If you're using C, string.h is still valid.
  8. jdhardy

    Polymorphic array.

    Quote:Original post by Endar Quote:Original post by deathkrush Don't store pointers in a std::vector, it's a bad idea. Try Boost Pointer Container, it's made specifically for that task. Why is it a bad idea? I do it all the time and the only problems I've had is when I've forgotten to do something important. It handles all of the pointer nastiness for you, and is (marginally) more efficient than std::vector< boost::shared_ptr< Base > > >.
  9. To add to what Dave said, always remember the rule of 3: If you need a copy constructor, assignment operator (operator=), or destructor, you probably need all three.
  10. jdhardy

    C++ Reference books

    Quote:Original post by xEricx Stroustrup's book is a great REFERENCE, but its kind of boring to read, so don't expect to learn C++ from it (I did, and it was a pain in the a...) I concur. Once you know C++, it's indispensible, however. Stroustrup and Josuttis will cover 90% of what you will need.
  11. Quote:Original post by owl I've read that to use dynamic_cast I RTTI must be enabled. Is it enabled by default? I'm using gcc. Yep. Most compilers are smart enough to turn on RTTI if they encounter a typeid() or dynamic_cast<>, or issue an error if they are used with RTTI off.
  12. Quote:Original post by snk_kid Quote:Original post by Tertsi I just don't get why they don't just supply lib or dll and include files and be done with it. At least I couldn't find any lib files installed. This is due to a number of reasons mainly the fact that boost strives for cross-platformance and support a large range of different C++ compilers. All these C++ compilers have different levels of standard compliance and anything that is platform specific is obviously different on each platform like OS filesystem. So each of boost libraries needs to be configured to work correctly on the each compiler and/or OS platform. There should be prebuilt libraries for VC7.1 and VC8 for 1.34, last I heard.
  13. Quote:Original post by Tradone right now i'm looking into bytestream binary save / load boost::archive::binary_oarchive/boost::archive::binary_iarchive. If you want to stay in memory (i.e. not use a file), use std::stringstream. You should be able to do compression using Boost.IOStreams, which provides gzip and bzip2 compression filters. Writing an encryption filter wouldn't be too much work, if you had a suitable encryption library (Crypto++).
  14. Quote:Original post by Promit SQLite isn't really meant for deployment on the web though...is it? Like most things, it depends. It's concurrent write preformance is dismal, since it looks the whole database (file). For read-only or single writer (say a blog) systems, it should be sufficient. Because you don't need a DBMS daemon running, it's also possible to use it on hosts that don't have a database server. Plus, administration is trivial - creating and deleting files is all you need to do. I have no idea how well it scales with concurrent readers, though. There's also an ASP.NET adapter that works well enough for my purposes.
  15. jdhardy

    I must know

    You won't be getting HDTV (High-definition TV), just DTV (digital TV). Basically, same content, same resolution, same quality, but uses less of the signal spectrum. Of course, this is about money, and the US government stands to make about $10 billion on the sale of the now-free spectrum, part of which will be used to subsidize converter boxes for those without TVs capable of handling the digital signal. This isn't about pushing HDTV, it's about making boatloads of money selling the now-free spectrum (Intel wants part of the 700MHZ TV band for WiMax, since it has much higher range the the 5.8GHz band they are working in now).
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!