![]() The function will only execute once because you have no means to loop through the vector. The switch will not work because "cls" does not contain a useful value, so it will check every case and exit the switch without doing anything. Not to keep this line its just for testing. Std::cout << " " << p.number << " " << p.cls << " " << p.ohb << " " << p.cost << std::endl Īfter the definition of "p" will give you an idea of what is in "p". I have not tried it yet, but I think putting this ![]() So what is its use? And does it need to be there?Īgain you have defined "Parts p ", but never do anything with it, so when you have the line total = p.ohb ohb has no value and total might equal whatever garbage is at the memory location of ohb. Again you are sending two parameters the first parameter is never used. it should beįor ( int i = 0 i
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |