Reputation
8,944
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 23 55
Newest
 Yearling
Impact
~411k people reached

Jun
24
comment Why is #include <iostream.h> bad?
@PravasiMeet: <iostream.h> was deprecated in 1998. You should NOT use it.
Jun
11
comment Accessing member of vector< pair<pair<int,int>, int> >
Opps. No Idone use g++ 3.4.2
Jun
11
comment Accessing member of vector< pair<pair<int,int>, int> >
@manetsus: But it does not work as C++11 or C++14. David and I agree. Your code is not standard compliant. C++ is not like ruby were there is a reference compiler implementation. The standard is based on the standard document. Iodine provides one implementation but does not show your code is standard compliant, just that it works on the Iodine compiler (which is clang (I believe)).
Jun
11
comment Accessing member of vector< pair<pair<int,int>, int> >
You can find a links to the standards here: stackoverflow.com/a/4653479/14065 The closest free draft to C++14 is N4296 you can download and read it at your leisure.
Jun
11
comment Accessing member of vector< pair<pair<int,int>, int> >
@manetsus: We are not disputing that it compiles on idone.com or your personal compiler. We are saying that it will not compile on all standard compliant C++ compilers (because it uses not standard headers). You have quoted the standard. So please quote me the section number were <bits/stdc++.h> is described as existing. You will not be able to because it is not in the standard. That is an implementation specific header file that is local to your compiler. But this is the wrong forum to discuss this in. Ask for a review at codereview.stackexchange.com to get feedback on how to improve.
Jun
11
comment Accessing member of vector< pair<pair<int,int>, int> >
@manetsus: I came very familiar with the C++ standard: stackoverflow.com/a/4653479/14065 . Which is why I say your code is none standard. The code review site on stackexchange: codereview.stackexchange.com is a place where you post your code for review and get people to help improve your code.
Jun
11
comment What is the “type” of data that pointers hold in the C language?
You can also take the address of a pointer (which gives you a pointer to a pointer to a type). Or derefernece a pointer which takes one level of indirection from the type.
Jun
11
comment What is the “type” of data that pointers hold in the C language?
@SteveIves: That is almost true for Von-Neuman architectures. It may not hold for other architecture types. A counter example is dataflow architecture. My experience on The Manchester dataflow machine (which had no concept of memory) and as a result a pointer was "<An Instruction (A Member of a graph)><An Instruction Port><A Colour><A Counter><Boolean Flag indicating if it had arrived>"
Jun
8
comment Accessing member of vector< pair<pair<int,int>, int> >
Agree with David here. None standard code that will not compile everywhere (just happens to work for you). This is not an Obfuscation competition. So many bad practices in such a small space. You should get a full review on codereview.
Jun
8
comment Accessing member of vector< pair<pair<int,int>, int> >
Why not use a std::tuple<int,int,int>
Jun
8
answered pthread versus boost::thread - need to set the thread priority on an ubuntu box
Apr
15
comment Designing exception classes
I tend to agree in principle with your reviewer (mixing error codes and exceptions is not really that useful). But unless you have a huge library having a big hierarchy is also not useful. A base exception that contains a message string, only have separate exceptions if the catcher of the exception can potentially use the uniqueness of the exception to fix the problem.
Feb
27
comment Why are structs and classes separate concepts in C#?
If you move your last paragraph to the top and delete the current first paragraph I think you have the perfect argument. But the current first paragraph is just subjective.
Feb
1
comment Should Latin-1 be used over UTF-8 when it comes to database configuration?
@CortAmmon: Not just emotional. But these things are already in production. So there is non zero financial cost as old systems need to be converted. Not just on the the DB but all the old code that touches the DB.
Jan
11
awarded  Yearling
Oct
22
awarded  Nice Answer
Oct
14
revised How to setup the c++ rule of three in a virtual base class
added 21 characters in body
Sep
30
awarded  Explainer
Aug
4
awarded  Nice Answer
Jul
15
comment Is it a good idea to “#define me (*this)”?
@Mehrdad: But only putting yes or no makes a very boring answer. Thus explanations are usually quite useful in explaining how the answer is reached (is encoraged by How to answer ). The conclusion is not to use because the OP has the wrong attitude to start with about using this and thus a discussion on that point is required to achieve a fully balanced conclusion.