What is the preferred way to read values of class members from an other class? For example: If class ClassA contains variables a,b,c, and ClassB contains a method that prints the values of a,b and c,...
Type: Posts; User: cminusminus
What is the preferred way to read values of class members from an other class? For example: If class ClassA contains variables a,b,c, and ClassB contains a method that prints the values of a,b and c,...
actually I'm looking for tutorials on STL right now...
thanks iMalc!
you solved my problem.
I didn't even think about that possibility...
what's a good tool to do that, does the standard VC++ debugger have something (easy) for that purpose?
ok, so calling the destructor is a reallllly bad idea...
OK I think that's complete enought :D
thanks Elysia
I don't know very mutch about STL, how fast are the functions in it compared to a pro -made linked list, when the goal is to create,
call and...
when I try to build that code with
void dyn_obj::function(int & value)
{
value++;
if(del_now)delete this;
else del_now = true;
}-runtime error,
4? two of them will be destroyed...
ok it's always good practise :)
yes, i'd like to make an another class where to place that call() function, the *first_obj and *prev_obj pointers and make it "parent" to the dyn_obj class, but when I tried I got like 40 errors, and...
everything exept the deleting works. when I try to call the destructor, it just simply removes the linking to other obj. but does not deallocate the memory.
"delete this;" wont work, and I don't...
I made a linked list of dynamic objects, and a function to call them starting from the first one.
I need to destroy a dynamic object using "this" pointer, or some other way...
the problem is that...
Is it poissible to initialize a multidimensional array located in a class in a way that i can set it's bounds as a constructor parameter? I mean like:
class Class
{
public:
Class(int, int);...
ok so the preprocessor will place the header code in place of the #include directive causing the file
class.cpp look like this:
class Class
{
public:
void function(int);
};...
ok thanks for help:D
odd that dev-cpp didn't give any warnings at all...
the MS VC++ 2008 express edition compiler gives a strange linker error message:
Error 1 error LNK2005: "public: void __thiscall Class::function(int)" (?function@Class@@QAEXH@Z) already defined...