Recent content by Speedo

  1. S

    Machine language program is the fastest?

    DevC++ is just the graphical user interface that wraps everything together. As I recall it comes with the mingw compiler set. See Why you shouldn’t use Dev-C++. There's really no reason to use it when much better free alternatives are readily available. C++ is a compiled language. I don't...
  2. S

    Why do GPU's dwarf the computational power of CPU's?

    According to this it was dethroned in 2009 and is now #7.
  3. S

    Why do GPU's dwarf the computational power of CPU's?

    Oh, we're well beyond that. They just don't stuff everything into one box, but instead have many computers working together on the same data. According to Wikipedia the most powerful supercomputer at the moment is Tianhe-I with 14,336 hex core CPUs and 7,168 GPUs. That comes to 86,016 CPU...
  4. S

    Understanding Data Types: Int, Float, and Unsigned Char

    As I recall the only guarantees are that sizeof(char) is 1, and sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long).
  5. S

    Machine language program is the fastest?

    DevC++ doesn't actually execute the compiled code. It takes your source code and passes it into a compiler (which is a separate program in itself). That compiler generates object code, which it then passes on to a linker (typically another separate program). The linker puts everything...
  6. S

    Japan Earthquake: Nuclear Plants at Fukushima Daiichi

    Assuming that the generators had functioned normally, what kind of process would the reactors have gone through after the quake before they were brought back online? I'm mainly wondering why it wasn't/isn't feasible to bring one reactor online at a low power setting to provide enough power to...
  7. S

    Download Speeds: Limiting Factors and Mass Production

    Not really, unless that person is going to revamp the internet for the entire world. It doesn't matter if you have a 1000 Tb/s connection if that computer you're download from in on 56k. Your connection, the connection of the target server, and all the hops in between would have to support 10...
  8. S

    Where Can I Find Resources on Orbital Mechanics for Game Development?

    Not sure this is the right section for this question, but it seems the closest so... I'm part of a small team that's working on designing a scifi space-based realtime strategy (RTS) game. One of the things that we'd like to incorporate into the game is relatively realistic Newtonian physics...
  9. S

    Are pointers important for scientific research?

    I was more speaking in terms of dynamic memory. You can't use references there (well, you can, but it's convoluted and back-asswards and frankly, anyone doing it should be shot). That said, pass by [const] reference should pretty much be the default for non-POD function arguments in C++. I...
  10. S

    Are pointers important for scientific research?

    At least in C++, the goal is generally to use raw pointers only when absolutely necessary by letting the "dirty work" be hidden by things like STL containers and smart pointers. However, you're still going to need to know how pointers work if you want to be proficient with C++ or C.
  11. S

    C# Can anyone explain what this c# code does or give a C equalivent?

    The C code is essentially identical to the C# code given. Just replace the "byte" type with "char", and change the first parameter of Replace from a reference to a pointer.
  12. S

    C/C++ Troubleshooting a Private Member Double Array in C++

    Or better yet, just use a vector of vectors. It's not possible to do it directly, because there isn't actually an operator[][]. You have to define operator[] of your class to return a dummy object, then have operator[] of the dummy class return the actual value. Basic example would be...
  13. S

    C/C++ How to Use a Map in C++ for Pipe Sizes and Schedules?

    You can't use raw arrays since they aren't copyable as required by STL containers. You'd have to use std::tr1::array, boost::array or a std::vector.
  14. S

    Best Beginner Programming Language?

    If you're going to start with a C-style language, I don't really see why you'd go with C over C++. C++ gets more complex to be sure, but for the beginner there are so many things that are overly complex and/or have to be hand written in C that are utterly trivial with C++. The problem of...
Back
Top