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...
Type: Posts; User: chadsxe
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...
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...
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...
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...
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
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 =...
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...
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...
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...
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...
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.
...
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...
I thought std::list would splice off the deriving class.
So the actual type of the std::list has to be defined? Darn. Looks like I have to redesign some things.
Regards
Chad
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
{
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
Oh I get it now. But would it not be 2^256 - 1?
I would if I knew how hence me having to ask. How did you do that?
What is the largest value you can represent using a 256-bit unsigned integer? unsigned means non-negative correct?
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....
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...
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)...
Well I guess I am backwards.....I learned C++ first...then C#....
All three will be fine but personally I am all for learning the hardest first. So with that said I would go with C++....
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;
...