Sep. 19th, 2005
again with the C++/STL
Sep. 19th, 2005 10:31 pmThis worked for someone at some point:
update: It appears that putting typename before the declared type fixes it. I will just shake my head and continue patching rather than passing further comment on this.
deque<T>::iterator iter = container.begin ();Can someone better versed in C++/STL tell me how to make such a thing work in gcc 4? I've tried various combinations of adding std, adding and removing bits of the object typing at random, separating the declaration from the usage, and googling for "good code" to do the job. Mostly, I seem to be finding documents telling me what a deque is, combined with a few that give the exact format above as the way to use it. For context, this is inside a templated operator function like this:
template <class T> ClassName& operator>>(deque<T>& container)and the compiler is complaining that it expects a ; before iter which suggests to me that the inline declaration somehow isn't working.
update: It appears that putting typename before the declared type fixes it. I will just shake my head and continue patching rather than passing further comment on this.
commute update
Sep. 19th, 2005 10:54 pmDoor to DART: ~10 mins
DART to Tara Street, walk to Aston Quay: ~35 mins, fare €1.90 (single)
Bus to James' Gate: ~10 mins, fare €0.90
I think I got extraordinarily lucky with the bus (noone wanted to get on or off for the whole length of the quays) and the inter-mode timing (DART arrived within minutes of me getting to the station, bus was waiting at the stop when I reached it and departed within minutes of me getting aboard) but it certainly looks like a viable commute. I walked from the office to the DART on the way home - 30 minutes, roughly - and just to reassure me that not all was sweetness and light, the DART was running slowly due to some problem with a level crossing, meaning the trip home ran a good deal longer (the southbound DART wasn't as fortuitously timed, either).
DART to Tara Street, walk to Aston Quay: ~35 mins, fare €1.90 (single)
Bus to James' Gate: ~10 mins, fare €0.90
I think I got extraordinarily lucky with the bus (noone wanted to get on or off for the whole length of the quays) and the inter-mode timing (DART arrived within minutes of me getting to the station, bus was waiting at the stop when I reached it and departed within minutes of me getting aboard) but it certainly looks like a viable commute. I walked from the office to the DART on the way home - 30 minutes, roughly - and just to reassure me that not all was sweetness and light, the DART was running slowly due to some problem with a level crossing, meaning the trip home ran a good deal longer (the southbound DART wasn't as fortuitously timed, either).