Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array bound problem

Status
Not open for further replies.

kathyayini

Programmer
Joined
Aug 16, 2002
Messages
52
Location
IN
I am passing char* cProcedure[] array from exe to dll. I dont know what will be the size of the array. it can be 4 or 5 and so on. So in dll i am receiving that array in char * cProcedureName[] with no size specified. So how to check what is ihe exact size of the array. The problem i am facing is even after i cross the upper bound of the array it shows me the junk value. i tried to check with NULL and \0 values, but failed.

waiting for the reply.

 
There is no way you can tell about the size of the array unless you decide to put a kind of endmarker in the end of the array, or add an extra parameter to the function.
(I assume you have the source for the dll as well as the exe ?)

Have you considered to use a string class or a vector ?

/JOlesen
 
I am using string class.
thank you for your suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top