| smemamian (2) | |
|
How can I have a class as follows: cin: student 1 : ID,Name,Last name,Address . . . . to student 10 : ID,Name,Last name,Address And have the ability to search(Based on ID And Last name). Tnx | |
|
|
|
| SirSen (8) | |||
use a data structure:
well, as for the ability to search i dont know yet | |||
|
Last edited on
|
|||
| Smac89 (10) | |||
use a for loop to search based on highest ID or based on highest ASCII code of the name. reading in the names as int will work for the ascii method
| |||
|
Last edited on
|
|||
| Darkmaster (331) | |
| he asked for a class, not a struct | |
|
|
|
| maeriden (230) | |
| Structs and classes are the same thing, except for the default access level | |
|
|
|
| Darkmaster (331) | |
| @ maeriden: hm, did some reading and you're right. and i was sooo sure it's not the same :D | |
|
|
|