You've given me a great example(person) .Thanx a ton.
Type: Posts; User: lydiapeter
You've given me a great example(person) .Thanx a ton.
Could u suggest a good example for operator overloading other than the fraction or the inches problem.
main()
{
int b=1;
unsigned int a=-1;
if(a<=b)
cout<<" a is less \n";
else
cout<<"b is less \n";
}
thanks a lot
if it is an arrayObject then the constructor could be invoked like
myclass m[5]={1,2,3,4,5} for the second ctor, right? Can't it happen for an pointer then!!Help me.
class myclass
{
int i,j;
public:
myclass():i(0){}
myclass(int a):i(a),j(a){}
myclass(int a,int b):i(a),j(b){}
void put()
{
cout<<i<<" "<<j<<endl;
thanks a lot
what actually happens here
Could anyone explain dangling pointers with better programs.
just try out this so u could find the answer for your previous problem
#include<stdio.h>
main()
{
char *s1="Hello";
for(;*s1!='\0';s1++)
printf("%s",s1);
}
The same gives errors in c++.Is that the default type of augument in c is void and c++ is not void?
#include<stdio.h>
#include<conio.h>
void get()
{
printf("Hello\n");
}
main()
{
clrscr();
get(10,20);