Hi
Just have a few questions
1. Virtual functions can be accessed using object pointers only ??
2. We cannot have virtual constructors but we can have virtual destructors ??
:confused:
Type: Posts; User: aldajlo
Hi
Just have a few questions
1. Virtual functions can be accessed using object pointers only ??
2. We cannot have virtual constructors but we can have virtual destructors ??
:confused:
Please tell me the difference between composition and aggregration.
They seem to be the same to me.
i am writing a function in which based on some condition i am supposed to call another function with this passed as a parameter to it..
my code is somewhat like this..
class b
{...
i have a query.....
what is preffered for binary operators to be overloaded
1. member function..
2. friend function..
#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
const int N=100;
class A
{
private:
int ar[N];
public:
pointers are important and only when u get involved in programming with different approaches for the same problem you will come to know of the difference between the approaches.....
all the guys out...
maybe you should.....
1. uninstall the current Dev_C++
2. download the setup for Dev-C++ 4.9.9.0
3. install it...........with the default directory provided while installing.......
use all...
Thanks a lot ........
Shakti you were right........
i uninstalled Dev-C++ and then downloaded it again.....
reinstalled it.......
the program works fine.......
thanks to all those who...
#include <iostream>
using namespace std;
class complexnum
all my question revolves around the first line ..............
please answer my question ...............
which is quite to the...
oh sorry.....
but the problem starts with the first line itself.....
how do i continue........knowing about others?
please help me with that error it gives to me on the first line :
"iostream :...
yes i know...........
but it has to be there........
so what is it thats wrong it that..........
i am not getting it......
please help me understand........
i am using devc++
and my code is
#include<iostream>
using namespace std;
class complex
i didn't get it......
what did u mean Quzah.....
it's just using that variable thats making the output go wrong
and i don't get it . why?
please explain.......
i tried the same code as such but still using the variable 'is'
int is = 0;
int isdiagzero(int a[][10],int m,int n,int *i,int *j)
{
if(((*i)<m)&&((*j)<n))
{
if(a[*i][*j]!=0)
...
i am still not getting it
please help me
again salem.........
1. this thought too had crossed my mind
is = isdiagzero(a,m,n,(*i)++,(*j)++); //is this parameter passing right i++,j++
it used to give me some...
i had understood that before
and tried writing the code as
int i=0,j=0;
if(isdiagzero(array,m,n,&i,&j)==0) //type - recursion
// if(isdiagz(array,m,n)==0) //type - iteration...
i tried that but the exception is still coming
the output is correct if i use type-iteration
and an exception is generated from the type-recursive
the modified code is
#include<stdio.h>...
not able to understand where the problem is ..
Determining if a mtrix has in it's diagonal - all zeros
#include<stdio.h>
int isdiagzero(int a[][10],int m,int n,int *i,int *j)
{
...
here is a maze problem
0 indicates - solid cells
1 indicates - empty cells
# indicates starting position
@ indicates ending position
i have written the program assuming there r no loops
but...
i agree with vicious
this is binary arithmetic as i suppose
it is like this
11111111 + 1 = 100000001
since in binary most significant bit represents a sign
it gets set to 1 and read as...
actually i understood that problem after i last posted my message and have rectified it . such a silly mistake!
well thanks a lot still for providing help
the output now is
OUTPUT :
STACK...
i suppose that in yr code add a temp variable to store the result of previous comparision and compare it with the new result
if it equals don't print it
hope so i understood ur question !
i tried those corrections but only a minor diffrence in output
OUTPUT :
STACK
push 1 1-------------------------------------->here pushes 1
push 2 Stack overflow 1-------------------> why not...
if i am right you re sorting in hi_rent_model
first u r adding the rents of the models by all of its manufacturers
storing them into a temporary struct varable
then u r sorting them according to...