Forum: C++ Oct 9th, 2009 |
| Replies: 1 Views: 304 hi,
just want to ask, is it possible to restrict friend acess to a single class member function only?
in other words, if class A grant class B friend access to class A member function, then... |
Forum: C++ Oct 6th, 2009 |
| Replies: 0 Views: 415 Hi,
I am trying to implement a Data Manager class (singleton) that initializes data, keep track of memory usage and acts as a data pool for other classes to share the data.
My problem lies with... |
Forum: C++ Oct 5th, 2009 |
| Replies: 3 Views: 259 Thanks a bunch. I failed to see it that way initiall because when data1 and data2 are global variables, they retain the memory location after coming out from LoadData(). |
Forum: C++ Oct 5th, 2009 |
| Replies: 3 Views: 259 Hi,
I have the following functions
void LoadData(char* file, float* data1, float* data2)
{
// read data size and contents from file
data1 = new float[dataSize1];
data2 =... |
Forum: C++ Sep 24th, 2009 |
| Replies: 2 Views: 224 Hi all,
How about this?
In this example, what is the correct way to initialise Secret mission?
class Secret
{
private:
int data; |
Forum: C++ Sep 24th, 2009 |
| Replies: 3 Views: 222 Thanks! That's very clear and concise. |
Forum: C++ Sep 24th, 2009 |
| Replies: 3 Views: 222 Hi all,
Maybe you can help me with this...
in the code
float dot(const Vec3& v) const { return (x * v.x) + (y * v.y) + (z * v.z);}
What is the purpose of the keyword const? Why in the... |