Search:

Type: Posts; User: philvaira

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    901

    I'll stick with the static solution since it is a...

    I'll stick with the static solution since it is a little cleaner. Thanks :)
  2. Replies
    6
    Views
    901

    Good idea. I changed my code to the following. If...

    Good idea. I changed my code to the following. If I'm using malloc, I'd have to call free though. I'd like to do it within the function so I'm not calling free() outside of it.

    Another solution...
  3. Replies
    11
    Views
    3,525

    Agreed. It's a bunch of kids and following the...

    Agreed. It's a bunch of kids and following the leader really. I found myself more productive when I stopped going to that site.

    Edit:
    I would recommend the IGDA forums: http://www.igda.org/
    ...
  4. Replies
    6
    Views
    901

    Return string issue

    I have an interesting problem here. The function returns the first cell of a local array, so I am getting this: returning address of local variable or temporary. How can I return a new string without...
  5. Replies
    42
    Views
    4,516

    The short answer is Microsoft recommends using...

    The short answer is Microsoft recommends using DirectX on their operating system, so the majority of professional Windows developers use DirectX. In doing so, they have the support of Microsoft and...
  6. Replies
    6
    Views
    2,544

    Games with free source code?

    Hello,

    Besides ID Software, is there any free source code that game companies have given out? I'm interested in viewing them. The only ones I could find are written in 1992-1997 mostly in the DOS...
  7. Replies
    33
    Views
    7,477

    Hello, My name is Phil and I am a recovering...

    Hello,

    My name is Phil and I am a recovering bias addict.

    OpenGL and Direct3D do about the same things. They call the same graphics hardware. OpenGL was easier in the past due to its...
  8. Replies
    4
    Views
    1,058

    Yes, the second assumption is what I meant. ...

    Yes, the second assumption is what I meant.

    I'm debating whether to do this or just keep a static array. I think malloc/free is the best way to go so I'm not wasting memory and I can resize if...
  9. Replies
    4
    Views
    1,058

    I was afraid of that. Unfortunately that means...

    I was afraid of that. Unfortunately that means having something like String_Release(&str); at the end of every function that initializes a new string. Is there any way around it?

    I could do this...
  10. Replies
    4
    Views
    1,058

    strcpy() issue

    I'm curious if this can work somehow? My goal would be having a dynamic string structure and have functions that operate it more extensively than the standard library. However, I don't want to delete...
  11. Alright, thanks!

    Alright, thanks!
  12. How to insert a single value into every array alement?

    I am currently using this code...

    for (int i = 0; i < m_size; i++)
    m_array[i] = EMPTY_CELL;

    EMPTY_CELL is -666.
    m_array is a dynamic array pointing to an integer.

    Instead of using an O(n)...
  13. Replies
    4
    Views
    4,120

    What's a good data structures book for C?

    I would like to find a data structures book that uses straight C, is designed pretty well, helps you build your own little data structures library, etc. Any recommendations would be great, thanks.
  14. Replies
    4
    Views
    5,115

    I'm not sure how vector does it. What do you mean...

    I'm not sure how vector does it. What do you mean as an undefined behavior? I don't know if this would make much sense...



    Datatype& operator[] (const int p_index)
    {
    if ((p_index >= 0)...
  15. Replies
    4
    Views
    5,115

    cannot convert 'int' to 'int &'

    I got a small problem. I have an array class and it returns an index as a reference so it can be accessed or modified.



    // Allows accessing and modifying the array's contents.
    Datatype&...
  16. Replies
    15
    Views
    1,828

    That's getting there. I didn't get any crashes...

    That's getting there. I didn't get any crashes this time around.

    I was expecting:
    10
    20
    30

    Instead, I got:
    0
    20
  17. Replies
    153
    Views
    240,105

    Sticky: C++: The Complete Reference, 4th edition by...

    C++: The Complete Reference, 4th edition by Herbert Schildt. It really is a one-stop reference. I use it all the time as a reference book. It's a great tutorial for beginners too and teaches more STL...
  18. Replies
    15
    Views
    1,828

    Okay. I'm still wondering why the for loop...

    Okay.

    I'm still wondering why the for loop keeps going. It could be the forth() method perhaps.

    Edit: ah ha, it's not the for loop but the destructor. I wonder what would be causing it. It's...
  19. Replies
    15
    Views
    1,828

    Okay, thanks for letting me know.

    Okay, thanks for letting me know.
  20. Replies
    15
    Views
    1,828

    Thanks for the responses. It was too difficult...

    Thanks for the responses. It was too difficult for me to get two files talking to each other, so I combined both classes in one file, added a forward declarion, and it compiled fine. I don't know if...
  21. Replies
    15
    Views
    1,828

    Each class is in its own header file. I wonder if...

    Each class is in its own header file. I wonder if it's just the wrong includes on top? The syntax looks fine, so if its just having a problem with SListIterator, it seems that its not the code but...
  22. Replies
    15
    Views
    1,828

    Problem with creating a singly linked list

    I was carefully going through the examples in a book of mine. Everything was going fine until I created the SListIterator class. It keeps pointing at its constructor. I tried everything but no luck....
  23. Replies
    4
    Views
    6,568

    Writing C#'s Console::WriteLine in C++

    There is something that I would really enjoy in C++ if it is possible.



    class Console
    {
    public:
    template <class T> static void WriteLine(T text)
    {
    std::cout << text << std::endl;
  24. Replies
    4
    Views
    2,273

    Yeah, I just googled that. I had to go to Project...

    Yeah, I just googled that. I had to go to Project - Properties - C++ - Language - Enable Run-Time Type Info. I thought it was on by default. Thanks for the help. It's working as expected now.
  25. Replies
    4
    Views
    2,273

    Makes sense. I added a virtual destructor to...

    Makes sense. I added a virtual destructor to class Mammal. As I compiled, I got the following warning:

    warning C4541: 'typeid' used on polymorphic type 'Mammal' with /GR-; unpredictable behavior...
Results 1 to 25 of 72
Page 1 of 3 1 2 3