Search:

Type: Posts; User: threahdead

Page 1 of 9 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    2,402

    Are you trying to do this with OpenGL?

    Are you trying to do this with OpenGL?
  2. Replies
    2
    Views
    874

    Please have a look at how to define functions in...

    Please have a look at how to define functions in C++:

    <return type> <function-name>(<arguments>);

    If the functions you implemented are not static, you first need to create an object of that...
  3. Replies
    4
    Views
    1,447

    Yes, if its preallocated, this should work, too.

    Yes, if its preallocated, this should work, too.
  4. Replies
    4
    Views
    1,447

    fread() takes a void pointer. So the procedure to...

    fread() takes a void pointer. So the procedure to do this would be to allocate enough space and then call fread() once.
    After you read the data you can cast the structure over it and get the values...
  5. Replies
    19
    Views
    7,064

    Try creating the C++ project as an empty project....

    Try creating the C++ project as an empty project. This can be done in the C++ project creation dialog.
  6. Thread: Typecasting

    by threahdead
    Replies
    3
    Views
    1,707

    A dynamic_cast is safer than static_cast because...

    A dynamic_cast is safer than static_cast because it checks at runtime wheter the cast is allowed.

    See dynamic_cast [C++ Reference] and static_cast [C++ Reference]
  7. Replies
    5
    Views
    2,148

    Thanks for all your input, it helped me alot!

    Thanks for all your input, it helped me alot!
  8. Replies
    5
    Views
    2,148

    Thats pretty much what i need to do. But you're...

    Thats pretty much what i need to do.
    But you're saying i should do it at runtime, although i know the types at compile time?

    What i have in mind is something like this


    template<class Type>...
  9. Replies
    5
    Views
    2,148

    C++ Runtime Decisions

    Hello,

    suppose i have something like this



    class Storage
    {
    public:
    Storage(int storageType)
  10. Replies
    2
    Views
    4,361

    The line marked in red is assigning a char * to a...

    The line marked in red is assigning a char * to a char. This will get you a compile time error.

    You should, like Salem said, use C++ streams and std::string for the studentlist.
  11. Replies
    9
    Views
    3,949

    You will need an array of 12 x nParseCount, which...

    You will need an array of 12 x nParseCount, which basically is a



    const int bufferSize = 12;
    unsigned short **naaLeadBuffer;
    naaLeadBuffer = new unsigned short *[bufferSize];
    for(int i = 0;...
  12. Replies
    9
    Views
    3,949

    You cannot create the array naaLeadBuffer with...

    You cannot create the array naaLeadBuffer with the size nParseCount. The size in the [] brackets has to be known at compile time.
    Try using the new operator instead and allocating the memory...
  13. Replies
    3
    Views
    1,055

    template class Base { public: ...

    template<typename T>
    class Base
    {
    public:
    Base(void) {};
    ~Base(void) {};
    };

    template<typename T>
    class Derived : public Base<T>
  14. Replies
    8
    Views
    2,010

    You should get a compiler error because var needs...

    You should get a compiler error because var needs to be a pointer to a class1 object.



    class1 *var = new class1();


    As far as i know, my_class should be deleted too, when you delete an...
  15. Replies
    4
    Views
    3,549

    Hi, converting to BMP might be alot easier...

    Hi,

    converting to BMP might be alot easier than to convert to JPEG. See BMP file format - Wikipedia, the free encyclopedia for a detailed description of how the headers of the BMP file have to...
  16. Replies
    6
    Views
    5,309

    I remember i had to program a backgammon game...

    I remember i had to program a backgammon game once with ASCII output.
    You should have a data structure set up, that represents the placement of the stones. If it were to be a 2D Matrix you would go...
  17. Replies
    6
    Views
    5,309

    Hi, could you be a bit more specific about your...

    Hi, could you be a bit more specific about your problem? Posting your source code might be a good idea too.
  18. Replies
    7
    Views
    1,294

    Absolutely. But using structs, or something...

    Absolutely.
    But using structs, or something similar, is easier to grasp though. There is no need to understand how a number is represented in binary for that.
  19. Replies
    7
    Views
    1,294

    wrong thread? ;)

    wrong thread? ;)
  20. Replies
    7
    Views
    1,294

    A hint, take a look at structs.

    A hint, take a look at structs.
  21. Replies
    8
    Views
    2,591

    I totally confused a NULL pointer with a value of...

    I totally confused a NULL pointer with a value of 0 inside the array when i posted this.
  22. Replies
    8
    Views
    2,591

    Thanks for all your input! Actually i was a...

    Thanks for all your input!

    Actually i was a bit zealous to change everything to const correctness after reading about it. This doesn't make sense in this case where my getters should be returning...
  23. Replies
    5
    Views
    1,972

    Yes.

    Yes.
  24. Replies
    5
    Views
    1,972

    After this assignment, you can index x from 0 to...

    After this assignment, you can index x from 0 to 1999.
    Another way to put it is to say now you have 2000 doubles allocated in memory which must be deleted afterwards again with



    delete [] x;
  25. Replies
    8
    Views
    2,591

    Style of getters

    Hello,

    with the const correctness chapter of the C++ FAQ in mind, i think about redesigning my getters.

    I have the following code example:


    template<typename T>
    class Container
    {
Results 1 to 25 of 214
Page 1 of 9 1 2 3 4