a)how to run c++ program on Borland c package.I am preparing a graphic program on c++ but my progrm shows it can't run on windows.
b)how a pointer is un limited array.:)

a) I suspect you are attempting to use 16-bit borland graphics functions with a 32-bit compiler? If not then I have no idea what you mean. You will have to post actual error message(s)

b) a pointer is just the address to the beginning of an array. Of course there is a practical limit on the array's size -- nothing is infinite. But I think what they were saying is that just having the pointer along one cannot determine the array's length. If it is a pointer to a string then you can call strlen() function to get its length, but the array size can larger.

Example:

int foo( char * pointer)
{
  return strlen(pointer);
}

int main()
{
   char name[255] = "Jones";
   int len = foo(name);

   return 0;
}

In the above code function foo() returns the length of the string but has no clude about how big the array of characters.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.