You print out the wrong content. Variable b is your index and use myarray[b] to retrieve the value of each element in the array.
Code:cout << "myarray [" << b << "] = " << myarray[b] << "\n";
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 2 of 2
Thread: Array problemThreaded View
|
Click Here to Expand Forum to Full Width |