Search:

Type: Posts; User: LyTning94

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,128

    Thanks for the link, it works great now! That was...

    Thanks for the link, it works great now! That was a lot simpler of a solution that I expected.
  2. Replies
    4
    Views
    1,128

    Polymorphism with templated classes

    I'm trying to define a variable type at runtime based on user input, so what I did was created an abstract base class Variable and derived a templated class from it.


    class Variable
    {
    public:
    ...
  3. Replies
    13
    Views
    3,571

    While looking for ways to compile GMP in VC++, I...

    While looking for ways to compile GMP in VC++, I stumbled across MPIR, which is a Windows-based version of GMP. I compiled that in VC++ and everything worked great. I haven't tried it out yet, but...
  4. Replies
    13
    Views
    3,571

    Okay...is there any way to link to this file in...

    Okay...is there any way to link to this file in VC++?
  5. Replies
    13
    Views
    3,571

    I tried this, and it appears to compile fine. I...

    I tried this, and it appears to compile fine. I ran 'make check' and all the tests were successful. I then ran 'make install', which as far as I can tell should have installed the .lib file to...
  6. Replies
    13
    Views
    3,571

    I tried to compile GMP on cygwin, but I'm getting...

    I tried to compile GMP on cygwin, but I'm getting the following errors:



    I checked, and the file libgmp.la does exist at that path. I used

    ./configure --enable-cxx
    make

    to compile.
  7. Replies
    13
    Views
    3,571

    Storing numbers larger than long long

    Is there a library out there that lets you store numbers that are too big for a long long? This is all theoretical--I don't actually have a use for it, I'm just wondering if it's out there.
  8. Replies
    104
    Views
    13,210

    Your first statement shows that you have no...

    Your first statement shows that you have no conception of what religion even is, which puts you in no position to pass judgement on it. Not to mention that I was talking about a moral issue, and...
  9. I did not write the code myself, but here is the...

    I did not write the code myself, but here is the grow array function which is called each time an object is added to the container:


    template <class T>
    void FFreeListTrashArray<T>::growArray()...
  10. Replies
    104
    Views
    13,210

    Okay, I don't want to go completely off-topic...

    Okay, I don't want to go completely off-topic here, but this statement really offended me. Comparing a programming strategy to a real-life moral issue is a terrible analogy. Not to mention that...
  11. Meaning...?

    Meaning...?
  12. Can you create an array/vector of resizable containers?

    Can you create an array of templated, resizable containers? For example, would this array work?


    TemplatedContainer<ExampleClass>* ptr;

    ptr = new TemplatedContainer<ExampleClass>[value];
    ...
  13. Okay, thanks for the suggestions.

    Okay, thanks for the suggestions.
  14. The problem is I'm modding a dll and don't have...

    The problem is I'm modding a dll and don't have access to the exe code, so I can't track the size of objects whose classes are defined in the exe.
  15. Is there a way to check the size of a dynamically allocated object?

    Since you can't use sizeof with a dynamically allocated object, I'm wondering if there's possibly a RTTI function that could return this for me? Or is it not possible?
  16. Replies
    4
    Views
    849

    Just return Count() == 5.

    Just return Count() == 5.
  17. Replies
    8
    Views
    1,517

    It appears to be working fine now. I guess...

    It appears to be working fine now. I guess adding ios::trunc to open() is what I needed. Thanks for the help.
  18. Replies
    8
    Views
    1,517

    fstream doesn't create a new file by default?...

    fstream doesn't create a new file by default? This could be the problem...how do I set it to create a new file?

    EDIT: I just read that you can't open a nonexistent file for reading, so I guess I...
  19. Replies
    8
    Views
    1,517

    @rags_to_riches Yes, the executable is in that...

    @rags_to_riches
    Yes, the executable is in that file.

    @jimblumberg
    I'm using Windows XP SP3. And yes to the other two questions.

    What's puzzling me even more is that yesterday it worked, but...
  20. Replies
    8
    Views
    1,517

    Can't open file

    std::fstream outputFile;
    outputFile.open("Mods/CivTacticalCombat/BattleInfo/UnitInfo.dat", std::ios::in | std::ios::out | std::ios::binary);

    FAssertMsg(outputFile, "Error opening...
  21. Replies
    7
    Views
    2,162

    Someone else familiar with the BTS SDK just told...

    Someone else familiar with the BTS SDK just told me it would be safe to comment out that line, so never mind.
  22. Replies
    7
    Views
    2,162

    Well, I'm modding the SDK for Civ4 BTS, so there...

    Well, I'm modding the SDK for Civ4 BTS, so there are quite a few headers used. I searched for #include <, which should bring up all the headers not included in the SDK itself, and here's what I got:...
  23. Replies
    7
    Views
    2,162

    Yes, I did. I found two different scenarios...

    Yes, I did. I found two different scenarios offered:

    1) I'm using a mixture of old and new I/O headers and functions
    2) I'm redefining the keyword new

    I'm not actually writing a new program,...
  24. Replies
    7
    Views
    2,162

    Error when trying to use fstream

    I'm trying to use fstream for some file I/O, but I'm getting the following error:



    any idea why this is occurring, and how to fix it?

    BTW, Merry Christmas to everyone! :)
  25. Replies
    4
    Views
    835

    Instead of if (path != 0 && < 5) you need:...

    Instead of

    if (path != 0 && < 5)

    you need:

    if (path != 0 && path < 5)

    In other words, the && or || separates two individual conditional statements, not two conditions on one variable.
Results 1 to 25 of 61
Page 1 of 3 1 2 3