@CPAllinii Thank you for answer. But if two dlls(having same signature) in two different directories and linked by tw different executable. Then what will happened? Is the design same across different OS. Please answer. :^)
shaktikanta
Posts
-
What if two executable/Dynamic libraries use another common Dynamic library at the same time? -
What if two executable/Dynamic libraries use another common Dynamic library at the same time?Let two exes use same dll in windows platform at particular time.Then what is shared internally?Please correct me if I am wrong. -Dll file in Hard disk is shared(Single copy). -Instructions in Dll are loaded once and code can be used by both the executable. -The objects in the Dlls are also shared by both executable. Please clear me - The mechanism in windows os. whether this is same across all OS. Thank you in Advance.
-
How to store objects(Object properites) in a file with c++ native codes?I have n no of objects of a class. So what I want to do is - I want to save those data to a file when my application exit. So how it is possible to write multiple objects of same class to a file and read that file to make objects of the same class. Thanks in advance. :omg: :doh:
-
Please help me. Where to use <dynamic_cast> in c++ with example?dynamic_cast must be useful in parent child relation of classes. It helps to determine object type in a hierarchy. i.e - class Base{ }; class Derived1:public Base{ void der1Fun(){} }; class Derived2:public Base{ }; int main() { Base *bPtr = new derived1(); //now we want to call a derived1 function let der1Fun() Derived1* dPtr = 0; if( dPtr = dynamic_cast(dPtr) ){ dPtr->der1Fun() } else{ //Display the object is not of derived1 type } return 0; } I think this is why we need dynamic_cast.
-
Please help me. Where to use <dynamic_cast> in c++ with example?behavior of with abase/derived scenario and how it is useful.thanks in advance.
-
Which among following statements c/c++ code is faster?I think the first one is faster. because, the in second - variable first ! converted - the newly converted variable is converted to 1/0 for if statement but in first- -the == operator check bit wise datas of 2 numbers, if matched 1/if not 0. so i think the first one is faster. Whats your view..
-
Which among following statements c/c++ code is faster?int i = 0; statement 1: if( i == 0 ) statement 2: if( !i ) Although the speed does not matters in this case, but I want to know the way above 2 statements are evaluated.
-
what is the behavior of a statement logically operated with 0?Oh.. fine..But I read somewhere that when a signed value is compared with unsigned, signed converted to unsigned first. 0 is by default unsigned, hence signed version of -1 is greater than 0. May be old compiler showing this behavior.Do u have any idea?
-
what is the behavior of a statement logically operated with 0?I tried on gcc compiler, the statement 0 < -1 always false.please help.
-
what is the behavior of a statement logically operated with 0?ex- if( 0 < -1 ) I remember "C" compiler takes bits data of -1 to signed format and returns true for the above statement. Whats behavior in C++. Is the behavior same/different.Any updated standard(C/C++) brought changes to this behavior.Please answer.