substr() isn't a member function of an int. An int is a primitive, not a class. Also, you can't really call a substring on an integer.
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
>>if (memory[i].substr(0,4)=="0000")
memory is an array of integers which of course don't have methods.
[edit]^^^ what Shawn said[/edit]
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
It depends on what you want to do with that particular operation. You might need a string or you could just use modulus.
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268