/* Hello Friends ... I am a beginner in C++ */
#include<iostream>
#include<conio.h>
using namespace std;
class A
{
protected:
int a,b;
public:
A():a(0),b(0){ }
};
int main()
{
A *x;
x = new A[20];
delete []x;
getch();
return 0;
}
My question is, How do we create a parameterised Constructor in Class A such that I could pass some default values while dynamically creating the array without using for loop. Also please tell me,What is the syntax of passing those values?