S
Slawek
Hi,
I know that this is one of the topics that are most popular but I just have
to ask.
Can anyone give me some links, info etc about following question:
- how to reduce code dependencies
- make the code less vurnelable for changes (interfaces?)
Question is becaues I'm starting a new project and I was wandering how to
design classes to make to reduce dependencies.
Also some links with explanation about how exactly compiling work what the
actual difference between global variables and those allocated via 'operator
new'.
This question came up becaues I read that in order to reduce dependencies I
can do something like this:
class CFile;
class CLog
{
CFile *m_pFile
public
..... //code.... ble ble
}
but if I do this I have to dynamically create CFile?
I started to think about It... and I get to conclusion that me C++ skills
are to pure.... to explain myslef what is better
(other option is
#include "File.h"
class CLog
{
CFile m_File
public
..... //code.... ble ble
}
this is not only think.... so some good resources about differences in
memory allocation.. (I understand the concept of operator new, but I want to
understand the consequences of it....)
Thanks for any help...
regards,
Slawek
I know that this is one of the topics that are most popular but I just have
to ask.
Can anyone give me some links, info etc about following question:
- how to reduce code dependencies
- make the code less vurnelable for changes (interfaces?)
Question is becaues I'm starting a new project and I was wandering how to
design classes to make to reduce dependencies.
Also some links with explanation about how exactly compiling work what the
actual difference between global variables and those allocated via 'operator
new'.
This question came up becaues I read that in order to reduce dependencies I
can do something like this:
class CFile;
class CLog
{
CFile *m_pFile
public
..... //code.... ble ble
}
but if I do this I have to dynamically create CFile?
I started to think about It... and I get to conclusion that me C++ skills
are to pure.... to explain myslef what is better
(other option is
#include "File.h"
class CLog
{
CFile m_File
public
..... //code.... ble ble
}
this is not only think.... so some good resources about differences in
memory allocation.. (I understand the concept of operator new, but I want to
understand the consequences of it....)
Thanks for any help...
regards,
Slawek