L
Lindon
I've been bouncing back between my studies in C/C++ and have found
that I like parts of both languages... I find that pointer arithmetics
and arrays in C come extremely naturally to me, yet I can't get passed
the fact that C structures don't even compare to C++ classes (no
constructors, no member functions, of course no inheritance), there's
no function overloading, and the good GUI tools (and other library)
seem to be all for C++. But I don't really want to move to C++ and
use the iostreams instead of the stdio, or vectors and strings instead
of arrays and char*'s, (although I do find template/generic
programming interesting, I've decided to learn it as if it were
another language and treat it as such because using arrays and low
level C with it would be self defeating).
So my quesiton: is it acceptable to, say, have a char* class member
instead of a string? using MyClass* instead of a vector<MyClass>?
Writing C with structures that derive from other structures? Sneaking
in a const instead of a #define in a C prog?
And would mixing the two be a bad thing for larger programs?
The fact is that modern c++ compilers don't seem to care if I mix and
match so its rather tempting...
thanks, insightful advice would be appreciated
lin
that I like parts of both languages... I find that pointer arithmetics
and arrays in C come extremely naturally to me, yet I can't get passed
the fact that C structures don't even compare to C++ classes (no
constructors, no member functions, of course no inheritance), there's
no function overloading, and the good GUI tools (and other library)
seem to be all for C++. But I don't really want to move to C++ and
use the iostreams instead of the stdio, or vectors and strings instead
of arrays and char*'s, (although I do find template/generic
programming interesting, I've decided to learn it as if it were
another language and treat it as such because using arrays and low
level C with it would be self defeating).
So my quesiton: is it acceptable to, say, have a char* class member
instead of a string? using MyClass* instead of a vector<MyClass>?
Writing C with structures that derive from other structures? Sneaking
in a const instead of a #define in a C prog?
And would mixing the two be a bad thing for larger programs?
The fact is that modern c++ compilers don't seem to care if I mix and
match so its rather tempting...
thanks, insightful advice would be appreciated
lin