Click on image to see enlargment
A cruise line is automating its services but there is something seriously wrong with this program. Can you spot it?
bug560.cpp lint Output
--- Module: bug560.cpp (C++) _ i+1, itinerary[i] ); bug560.cpp(18) : Warning 560: argument no. 3 should be a pointer bug560.cpp(18) : Warning 437: Passing struct 'Port' to ellipsis --- Wrap-up for Module: bug560.cpp Info 754: local structure member 'Port::latitude' (line 5, file bug560.cpp) not referenced Info 754: local structure member 'Port::longitude' (line 5, file bug560.cpp) not referenced
Reference Manual Explanation
560 argument no. Integer should be a pointer -- The given argument (to one of the scanf or printf family of functions) should be a pointer. For the scanf family, all arguments corresponding to a format specification should be pointers to areas that are to be modified (receive the results of scanning). For the printf family, arguments corresponding to %s or %n also need to be pointers. Argument counts begin at 1 and include file, string and format specifications. For example scanf( "%f", 3.5 ) will generate the message that argument no. 2 should be a pointer.
If you have comments or questions about this bug, please post them to our Discussion Forum
Previous Bug - Bug #1541 - July 2011