Difference between revisions of "Talk:379: Forgetting"
Line 9: | Line 9: | ||
:I removed PHP as a possible language since PHP variable names start with a $. Zetfr 09:24, 20 May 2015 (UTC) | :I removed PHP as a possible language since PHP variable names start with a $. Zetfr 09:24, 20 May 2015 (UTC) | ||
::IT IS A COMBINACION EN C++/ANOTHER LENGUAGE IN THE FOURTH PANEL ASSERT HAS NOT PARENTHESES. IN C++ THE ASSERT MUST HAVE THE PARENTHESES AND SO CANNOT BE A C++ PROGRAM. PLEASE ADVISE {{unsigned ip|108.162.210.219}} | ::IT IS A COMBINACION EN C++/ANOTHER LENGUAGE IN THE FOURTH PANEL ASSERT HAS NOT PARENTHESES. IN C++ THE ASSERT MUST HAVE THE PARENTHESES AND SO CANNOT BE A C++ PROGRAM. PLEASE ADVISE {{unsigned ip|108.162.210.219}} | ||
+ | :::I think he meant it as c++. Higher level languages that forego the parens tend to also forego the semicolon. Probably just a typo on Randall's part since he had recently learned Python relative to this. |
Revision as of 00:24, 27 December 2015
The syntax for pointers in C++ is &pointer and *pointer. The arrow syntax is used e.g. in PHP. So this explain does need a review. And furthermore it should focus on the assert joke, understandable for non programmers.--Dgbrt (talk) 18:48, 31 July 2013 (UTC)
- Actually this works in C++ too. (*pointer).property is the same as pointer->property -- 17:58, 31 july 2013 (Time in Florida)
pair<int, int>* pntr = make_pair(5, 8); cout << (*pntr).first << endl; cout << pntr->first << endl; // the same as above -- 22:12, 31 July 2013 (Florida)
- I removed PHP as a possible language since PHP variable names start with a $. Zetfr 09:24, 20 May 2015 (UTC)
- IT IS A COMBINACION EN C++/ANOTHER LENGUAGE IN THE FOURTH PANEL ASSERT HAS NOT PARENTHESES. IN C++ THE ASSERT MUST HAVE THE PARENTHESES AND SO CANNOT BE A C++ PROGRAM. PLEASE ADVISE 108.162.210.219 (talk) (please sign your comments with ~~~~)
- I think he meant it as c++. Higher level languages that forego the parens tend to also forego the semicolon. Probably just a typo on Randall's part since he had recently learned Python relative to this.
- IT IS A COMBINACION EN C++/ANOTHER LENGUAGE IN THE FOURTH PANEL ASSERT HAS NOT PARENTHESES. IN C++ THE ASSERT MUST HAVE THE PARENTHESES AND SO CANNOT BE A C++ PROGRAM. PLEASE ADVISE 108.162.210.219 (talk) (please sign your comments with ~~~~)