class item_c
{
public:
item_c(char* name_in)
{
sprintf(name,"%s",name_in);
}
private:
char name[20];
}
and I have the pointer
item_c* item_p;
How do I go about initializing an object pointed to by item_p if with a string if I use new to allocate the memory?
Thanks in advance
http://www.geocities.com/ben32768
Hurrendously difficult C++ question
If I have a class like this
____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux
____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement