Search Results

Showing results 1 to 2 of 2
Search took 0.01 seconds.
Search: Posts Made By: swets_here ; Forum: C++ and child forums
Forum: C++ Jun 3rd, 2005
Replies: 28
Views: 45,636
Posted By swets_here
I tried using the sizeof operator as suggested above. But everytime for an int array it gives "1" as output and for a char array it gives "4". No matter how many elements I store in the array.
I...
Forum: C++ May 31st, 2005
Replies: 28
Views: 45,636
Posted By swets_here
I guess this would be helpful,
/******for a static array********/
char inp[4];
for (n=0;inp[n];n++)
; //do nothing inside the loop
cout<<n; //n will display the number of elements in the array...
Showing results 1 to 2 of 2

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC