Search:

Type: Posts; User: chadsxe

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Need help with returning and element of a std::list

    I need some help with the logic of a function I have. I simply am trying to return an element of a list...


    std::list < Font > m_fontList;

    Font &Graphics::GetFont( const std::string &fontName...
  2. Replies
    10
    Views
    8,423

    Yeah I realize this now. There Microsoft...

    Yeah I realize this now. There Microsoft platform depenedent. For educational sakes am I correct in my assumption that since lf.FaceName is a CHAR[32] then my destination size parameter of the _s...
  3. Replies
    10
    Views
    8,423

    Correct me if I am wrong but this is how you...

    Correct me if I am wrong but this is how you would use the _s versions correct?

    strncpy_s(lf.FaceName, 32, name.c_str(), name.length() + 1);
    strcpy_s(lf.FaceName, 32, name.c_str());

    Now to...
  4. Replies
    10
    Views
    8,423

    To all poster. Thanks for the responses. ...

    To all poster.

    Thanks for the responses.

    Both the strcpy and strncpy method work, but is it not possible to use the _s version of these functions?

    Also, what is the difference between...
  5. Replies
    10
    Views
    8,423

    Hmm not sure if I am grasping what you are...

    Hmm not sure if I am grasping what you are suggesting.


    char str1[] = strcpy(str1, name.c_str());
    Obviously this peice of code does not compile. Any suggestions?

    Thanks

    Chad
  6. Replies
    10
    Views
    8,423

    How to convert const char *' to 'CHAR [32]'

    I have to assing and std::string to a D3DXFONT_DESC font value and I can't figure the conversion.

    D3DXFONT_DESC lf;
    std::string name = "blah";
    lf.FaceName =...
  7. Well I just read through all the post and I will...

    Well I just read through all the post and I will take some time to think re-think my design as a whole. I actually might explore the option of dynamically allocating memory. Though I tend to want...
  8. Well the "Variable class" obviously is going to...

    Well the "Variable class" obviously is going to have to store a few different types of variables. Instead of declaring a type of each variable that I will be using in my simple scripting language in...
  9. I am working on a very very simple scripting...

    I am working on a very very simple scripting system. The templated class was used to represent a variable read in by the scipting system. It holds the name, type, and value. The list is actually...
  10. Then this appears to me to be the cleanest way of...

    Then this appears to me to be the cleanest way of doing this. Do you agree. I am guessing the code would go something like this.


    #include <boost/any.hpp>
    template <class T>
    class...
  11. I have never used boost so excuse me if I ask a...

    I have never used boost so excuse me if I ask a dumb question. In regards to boost::any does it only deal with c++ types i.e. flot string bool etc. Can it handle something like a D3DCOLORVALUE.
    ...
  12. Given m37h0d example would there worries of...

    Given m37h0d example would there worries of memory managment in regards to the pointers being stored in the list. Would erasing of elements in the list handle the destroying of the pointers or would...
  13. I thought std::list would splice off the deriving...

    I thought std::list would splice off the deriving class.
  14. So the actual type of the std::list has to be...

    So the actual type of the std::list has to be defined? Darn. Looks like I have to redesign some things.

    Regards

    Chad
  15. Can you make an std::list of a templated class.

    Quick question.

    I was wondering if I had a class that was template would I be able to use that class as the type for an std::list?

    i.e.


    template <class T>
    class TemplatedClass
    {
  16. Replies
    9
    Views
    3,928

    Wow. A little harsh don't ya think. We all have...

    Wow. A little harsh don't ya think. We all have to start somewere. I more so was looking for help with the theory behind it.

    Thanks for the help though,

    Chad
  17. Replies
    9
    Views
    3,928

    Oh I get it now. But would it not be 2^256 - 1?

    Oh I get it now. But would it not be 2^256 - 1?
  18. Replies
    9
    Views
    3,928

    I would if I knew how hence me having to ask. How...

    I would if I knew how hence me having to ask. How did you do that?
  19. Replies
    9
    Views
    3,928

    Quick question...

    What is the largest value you can represent using a 256-bit unsigned integer? unsigned means non-negative correct?
  20. VC++ 2005 express.... You just made me think...

    VC++ 2005 express....

    You just made me think of something....I wonder if the Platform SDK is installed on this machine.....hmmm...going to check now....
  21. Need some help with windowsx.h compile error.

    I am trying to compile source code that is from the book Programming a Multiplayer FPS in DirectX by Vaughan Young. It has been a task to say the least. My latest complie error has to do with...
  22. Need help turning this if sequence into a switch case

    How do you turn this....

    //macros to read the keyboard asynchronously
    #define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
    #define KEY_UP(vk_code)((GetAsyncKeyState(vk_code)...
  23. Replies
    19
    Views
    6,234

    Well I guess I am backwards.....I learned C++...

    Well I guess I am backwards.....I learned C++ first...then C#....
  24. Replies
    19
    Views
    6,234

    All three will be fine but personally I am all...

    All three will be fine but personally I am all for learning the hardest first. So with that said I would go with C++....
  25. Thanks for the help but I think I figured it out...

    Thanks for the help but I think I figured it out a few days ago....Hear is what I ended up doing..
    if (rect.right > 0)
    {
    gPosX = gPosX + xDirection;
    gPosY = gPosY + yDirection;
    ...
Results 1 to 25 of 131
Page 1 of 6 1 2 3 4