next up previous contents
Next: Iterators Up: Some programming recommendations Previous: Programming language   Contents


Compiler error messages for STL code

Compiler error messages for STL code are awkward. Here is an example:


{}
In file included from sim.cpp:5:
global.h: In function `void Simulate (int, map<id, Node *, less<Id>, 
allocator<Node *> >, map<Id, Link *, less<Id>, allocator<Link *> >, 
map<Id, Veh *, less<Id>, allocator<Veh *> >)':
global.h:358: conversion from `Link *' to non-scalar type `Link' 
requested

It is often helpful to first read the messages item by item and sometimes to re-arrange the messages:


next up previous contents
Next: Iterators Up: Some programming recommendations Previous: Programming language   Contents
2004-02-02