Dragonfly Q&A

\index {startUp() ! InputManager} int startUp() confusion.

0 like 0 dislike
I have never seen this usage of syntax in C++, so I'm not sure what to ask for when searching on Google.

This appeared on Listing 4.74, line 15 on page 109 in the book. (First time seeing line numbers next to the listings in the book, so faint...)

Do I type it out? Visual Studio reports error, so I have no clues as to what it is.
asked Sep 20, 2014 in Other by tom_mai78101
Sorry for the confusion.  If you find any other such odd syntax, please let me know - likely they are formatting errors.

1 Answer

1 like 0 dislike
Its a mistake on the book.

It happened a couple times within the Game Tutorial.

It simply is a call for int startUp() and the rest ( \index {startUp() ! InputManager} is some formatting code( I'm assuming, feel free to prove me wrong).
answered Sep 20, 2014 by lrlebrao
Ok, thanks for the info.
Exactly right.  In case someone cares ...

The book was written in Latex.  The syntax \index{...} is intended to add that as an index in the back of the book.  The trouble is, in the code listings environment, this needs to be escaped (I used @ as the character).  Forgetting the escape character doesn't cause an error, unfortunately, but just includes the odd syntax in the listing.
More information about Dragonfly can be found on the Dragonfly Home Page.