Hi Raghuram,
As u told that i am returning by value in the function becos of which a new object is created and for that a destructor is called.
when ever new object is created its Constructor must be called and when object go out of scope or life its destructor must be called but in this case only destructor is called. it must call Constructor for that new object to create object as its called for 2 object of Cl...
User Profile
Collapse
-
Constructor call
Hi
In my Code i am creating 2 object of my class and in assigentment operator
passing arugement by reference.
In output of my code i am getting to 2 Constructor call which right but there is 3 Distructor call which i am not able to understand why 3 Distructor call
#include<iostre am.h>
class A
{
public:
A(){cout<<"Cons tructor of A"<<endl;}... -
what is Difference between structure and class in C++
Hi All,
Can any one have any idea about this issue
what is Difference between structure and class in C++
Other then by default structure have public scope and class have private scope For data member and member function .If there is no other difference between Class & structure then why we use 2 key world in C++ we can use either class or structure in C++ ? -
Hi this code working fine for me check code & result
Code:--->
1 #include<iostre am.h>
2 void a (float value)
3 {
4
5 float size=0;
6 size=value;
7 while(size>=val ue)
8 {cout<<"Inside of while"<<endl;
9 cout<<"value of size in Function A = \t "<<size<<en dl;...Leave a comment:
-
Hi
try this code for
use this link
http://gdome2.cs.unibo.it/examples.html
or
xmlsoft.org/tutorial/xmltutorial.pdf
Full code removed per Posting Guidelines...Leave a comment:
-
operator overloading for (), [], ->
why operators (), [], -> and = can be overloaded only by class members.
or
why operators (), [], -> and = can not be overloaded by friend function. -
pure virtual function with body
Hi All,
1.Please check this code and its output which is working fine
while pure virtual functions( FUN1) prototype of Class CA is different
then Class CB Function (FUN1).
2. In Class CA pure virtual function ( FUN1) have body.
3. If i change my second pure virtual function(FUN2) prototype
class CA----> virtual int fun2()=0;
class CB---> void fun2(){ cout <<"... -
why we cannot create object of abstract class in C++
why we cannot create object of abstract class in C++.
or
what will be vtable value for pure virtual function in C++. -
Hi All,
Check this code its use to read XML data from XML file. try this code in your local system with command
cc create_xml.c -o create_xml -I/usr/include/libxml2 -L/usr/lib -R/usr/lib -lxml2 -lz -lpthread -lm -lsocket -lnsl
its create your EXE create_xml in local then run
./create_xml <file.xml>Leave a comment:
-
C function use to read & write an XML file
i am getting following error in my code
help me to slove this issue
$ gcc -Wall -g -I/usr/include/libxml2/libxml -c create_xml.c
In file included from create_xml.c:2:
/usr/include/libxml2/libxml/tree.h:20:31: libxml/xmlversion.h: No such file or directory
/usr/include/libxml2/libxml/tree.h:880:30: libxml/xmlmemory.h: No such file or directory
In file included from create_xml.c:3:
/usr/include/libxml2/libxml/parser.h:12:25:...
No activity results to display
Show More
Leave a comment: