Basically, read this article: India Graduates Millions, but Too Few Are Fit to Hire - WSJ.com.Originally Posted by juice
If we were working on the same team and I observed that you reached for the trick you so proudly displayed in post #10, I would fire you if I had the authority, or recommend your termination if I did not. The thing is, without proper learning materials, such an ad hoc learning process as you appear to be using now will cause you to be unable to differentiate the good from the bad.
Suppose I had seen you make posts that clearly showed that you understood C++ member access control, and overall I can see that you have a good foundation in C++. Then, I would see your post #10 as something that you found interesting, but I would trust that you understand why it should not be used in practice. But in this thread, you were unable to even make use of access control under normal circumstances in a simple scenario, so seeing you write what you did makes me seriously doubt that you are learning the right things.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
If my presence is not appreciated, am out a here...Good bye..... and there is nothing special with the use of pointers to access private variables, the only reason why I posted it was because I was online and was already discussing something with u people, but that's fine
The thing that is 'special' about it, is you are making a big assumption about the implementation of the class. Like I said, you are using an offsetof trick. This is not guaranteed to work for all implementations and for all cases and as such should be avoided.
Drop the attitude.
We are certainly not telling you to go away, but of course you have that option.Originally Posted by juice
Special? Probably not. Wrong? It depends. What is wrong is an attempt to bypass intentional access control. The fact that you are using a pointer is not so important.Originally Posted by juice
The "something" that you were discussing is directly related, so this explanation does not make sense.Originally Posted by juice
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Thats fine sir. I am new to programming, and I still have a long way to go. And I am in no state to suggest something to people like u. But I still believe that its better to invest time in learning something new and better, rather than looking for which country sucks at what and jeering at people. Plus I only joined this forum cause I found it helpful and people to be kind and supportive, but this is something that will certainly alter my beliefs.
Last edited by juice; 09-28-2011 at 02:32 AM.
If you actually read the article, you would see that its main point is that "the Indian education system needs to change its entire orientation to focus on learning", which is a quote from Saurabh Govil, "senior vice president in human resources at Wipro Technologies (...) India's third largest software exporter by sales". Where this applies to you is for you to take caution in your own education, i.e., be aware that your instructors and instructional material may be doing you a disservice, so you should seek what really brings you proper learning.Originally Posted by juice
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
I'll see to that. And thanks for the advice, but I strictly believe salem needs to change the way he talks..
On this risk of starting this discussion up again (which I do not want but it needs to be said), Salem does not need to change what he does. Sometimes he comes across a little crass, but honestly he has earned it. He has established his knowledge and ability to contribute with this forum. You my friend have not, and as such should mind your manners. This isn't just because we are on an internet forum, this is life. No matter where you are you always need to mind your elders, in this forum and the topic of programming in general, Salem is your elder. Show some respect and stop with the backtalk, otherwise you will find you stay here unhelpful and you might as well just leave.
How old is salem.
Well thats fine and it doesn't really matter how old is he cause I respected him for whatever he was, but just because u r 122 years old does not mean u will demean or disrespect somebody....
He wasn't; it was a warning as Laser explained. If you want to be a programmer you have to understand that the "norm" is being direct and to the point. In fact Salem was actually the first one to post a solution to your original problem.
I strongly recommend dropping this. Laser already explained the responses you recieved to the offsetof trick; I do not think there is anything more to discuss.