Quick question: is it possible to use a non-fundamental type name as a variable name?
In a BFS program, I am using a queue, but I would like this queue to be called 'queue'. The program compiles fine but is this legal?
'queue' is not a language reserved keyword. So yes it is perfectly legal.
You do have to watch for name conflicts though. If you are using another library that also has something named 'queue' it might cause complications.
Great, thanks!
It's just a very simple program and I'd rather use 'queue' than 'q'.
Topic archived. No new replies allowed.