No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I'm trying to iterate through a struct, but wanted to be able to do something along the lines of: string searchy = "jimmy"; string suffix = "firstname"; for (person dude : pnum){ if (dude.&suffix == searchy){ // Do things } } For those familiar with Perl/PHP, I'm trying to accomplish … |
|
Forgive me if the title was even worded properly. What I'm trying to accomplish is to be able to create an unlimited number of objects for use by struct and quickly realizing that my thought process on how to achieve that is wrong. Here's the related code: struct person { … |
|
I'll try to keep it brief. When I try to pass the 'list' vector to the counter function my compiler throws an error of: "error: request for member size in count, which is of non-class type std::vector<int>*" Googling hasn't produced anything quite what I'm looking for syntax wise. If someone … |