One thing is for sure: Before Ludwig Wittgenstein and Adolf Hitler took very different paths in life, they were, as young teenagers, students at the same school -- the Realschule in Linz, Austria. According to the Historical Dictionary of Wittgenstein's Philosophy, the young philosopher and dictator crossed over at the Realschule in 1904. (The overlap is also cited in Brian McGuinness' 2005 biography, Young Ludwig: Wittgenstein's Life, 1889-1921. Ditto A.C. Grayling's short bio of the philosopher.) Although born only six days apart, Wittgenstein and Hitler weren't in the same grade. Wittgenstein was already academically a year ahead of other students his age, and Hitler, a year behind. As for whether they knew one another, opinions vary. In a controversial 1998 book, The Jew of Linz, Kimberley Cornish argues that Hitler got into a schoolboy spat with Wittgenstein (whose ancestry was 3/4 Jewish), and somehow that spat proved to be a defining moment in the development of Hitler's anti-semitism. Scholars like University of Michigan's Laurence Goldstein have put a certain amount of stock in Cornish's argument. However, Ray Monk, author of Ludwig Wittgenstein: The Duty of Genius, discredits it, saying there's no proof the two ever crossed paths. And Monk is the most knowledgeable and credible authority in this area.
Then there's the photo above. Some say it shows Wittgenstein and Hitler separated by just one student. A tantalizing thought, to be sure. But the historical record casts that into doubt. If you head over to the German Federal Archives, then type "Hitler" and "1901" and "1902" into the search boxes, you will see that the image was taken in 1901 -- two years before Wittgenstein first started attending the school. Wikipedia has more on the photo. A copy of the complete school picture appears here.
So where does this leave us? It looks like Wittgenstein and Hitler did indeed walk the same halls for a year (circa 1904), but most likely without ever taking real notice of one another, or posing in the same photograph. Ultimately it's not a sensational historical factoid, but still intriguing enough.
Addendum: Some additional research indicates that Hitler attended the Realschule in Linz from 1901 through the end of the school year in 1904. The troubled student was then expelled. Meanwhile, scholars consistently put Wittgenstein's time at the school from 1903-1906. If there's a crossover year, it looks to me like it was the academic year 1903-1904.