Hi ,
I have a string array defined in the main function..
I am passing the array to a function and trying to
iterate the array . My code is something like this
inside main
string tradeId[8] = { "?" , "299339Z","299323Z","301537Z","348123Z","301545Z","301535Z","347597Z"};
and inside some function i am iterating the array as
for(int arrcnt = 0 ; glbDealid[arrcnt] !='/0' ; arrcnt++)
{
cout<<glbDealid[arrcnt];
}
But it is giving core dump error . Just wanted to check whether there is some other way of finding out the array length in C++..
Regards'
Dev
I have a string array defined in the main function..
I am passing the array to a function and trying to
iterate the array . My code is something like this
inside main
string tradeId[8] = { "?" , "299339Z","299323Z","301537Z","348123Z","301545Z","301535Z","347597Z"};
and inside some function i am iterating the array as
for(int arrcnt = 0 ; glbDealid[arrcnt] !='/0' ; arrcnt++)
{
cout<<glbDealid[arrcnt];
}
But it is giving core dump error . Just wanted to check whether there is some other way of finding out the array length in C++..
Regards'
Dev