-4

How to dynamically fill the structure which is a pointer to pointer of arrays in C++ implementing xfs

I think the words typedef and struct should be highlighted but aren't.

screenshot

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36

I tried editing and reindenting the code blocks, but it seems they were already indented correctly. Am I looking something over?

5
  • 7
    It doesn't have a language tag on the question - how does it know what highlighter to use?
    – Joe
    May 13, 2015 at 10:40
  • @Joe I was under the impression that SO uses a generic highlighter, is that no longer the case? meta.stackexchange.com/a/184109/132066 The question even has a language hint comment in it. May 13, 2015 at 10:42
  • Google Prettify uses a generic highlighter by default, but I don't think I've ever seen that on any SE site.
    – Joe
    May 13, 2015 at 10:45
  • "If there's more than one tag that has syntax highlighting, it uses a default " - from the page you link to @Tamás. Pick a language tag or force the highlighting.
    – Mat
    May 13, 2015 at 10:55
  • It's always been the case that you need to tag the question with the appropriate language tag in order to get the correct syntax highlighting.
    – AStopher
    May 13, 2015 at 12:17

1 Answer 1

7

The hint for c++ is not:

<!-- language: c++ -->

but

<!-- language: lang-cpp -->

and must appear immediately before each code block. Or add one language-all comment to have it applied to all code blocks in your post:

<!-- language-all: lang-cpp -->

I have edited the question.

7
  • Shouldn't the first one also work? It should take the default highlighting of the c++ tag IIRC.
    – user247702
    May 13, 2015 at 11:44
  • It's not my question, but thanks. May 13, 2015 at 11:46
  • @TamásSzelei - sorry, I shouldn't have made that assumption.
    – ChrisF Mod
    May 13, 2015 at 11:50
  • @Stijn - what do you mean? The question doesn't have the c++ tag.
    – ChrisF Mod
    May 13, 2015 at 11:51
  • That's alright, I only pointed that out because the question is not of great quality. May 13, 2015 at 11:59
  • 1
    @ChrisF I mean when you use <!-- language: c++ -->, it will use the default highlighting associated with the c++ tag, so it's equivalent to <!-- language: lang-cpp -->
    – user247702
    May 13, 2015 at 12:03
  • @Stijn - it doesn't though (or at least didn't appear to when I tried that). The key bit is that the hint must appear immediately before the code block and it doesn't carry on to subsequent blocks.
    – ChrisF Mod
    May 13, 2015 at 12:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .