I thought I would write a quick post about taking advantage of a useful feature in Eclipse when writing code - highlighting everywhere a selected item appears in the current file.
Ramblings about various things. Some Magic: The Gathering based articles, some software development, some posts just about miscellaneous things I do.
Showing posts with label code. Show all posts
Showing posts with label code. Show all posts
Friday, 13 March 2015
Thursday, 4 December 2014
Unexpected output: strtok
I was reading up on the differences between Java and C++ (as I have used the former the most recently and wouldn't want to wonder why declaring an array in the Java way in a C++ file was causing errors in a side project I'm working on).
One of the things pointed out was to read up on the strtok function (splitting up a String into tokens based on a delimiter) as it works quite differently than how it works in Java. So I read through it that evening - it does work very differently, so if I have to use it I need to remember to be careful when doing so.
The next day I looked at my laptop and found this:
Tokens everywhere! Something must have gone wrong...
(My son had found a pile of Magic: The Gathering tokens and decided they needed moving)
One of the things pointed out was to read up on the strtok function (splitting up a String into tokens based on a delimiter) as it works quite differently than how it works in Java. So I read through it that evening - it does work very differently, so if I have to use it I need to remember to be careful when doing so.
The next day I looked at my laptop and found this:
Tokens everywhere! Something must have gone wrong...
(My son had found a pile of Magic: The Gathering tokens and decided they needed moving)
Labels:
c++,
code,
humour,
joke,
magic,
mtg,
nerdy joke,
obscure joke,
programming,
strtok,
token
Subscribe to:
Posts (Atom)
