This is a discussion on Need help with a class assignment within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Elysia This is wrong, wrong, wrong. First off, never use NULL. In proper code, all pointers will ...
Well since I couldn't get help from my professor or fellow students, I thought I should go to different forums and see if I could get help from any of them.
But I have already specified in the other forums that my questions have been answered and that I do not need anymore help for now.
So yes, I stand by that. If your compiler doesn't support it, then make a define.
It's rather silly that GCC doesn't support it, as well. It is integral to the new standard library.
So for now, my program is running fine and my questions have been answered. Thanks to everyone who helped out.
since this is a class assignment, I would recommend sticking with NULL because that's what the teacher is likely to expect. most schools don't teach C++0x yet, and so aren't likely to accept code that uses new features.
> Schools will never go over to C++0x if no one pushes them.
Especially since half the schools on the planet are still stuck with TurbidCrap, which pre-dates ALL standards for C and C++.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.
>> So yes, I stand by that. If your compiler doesn't support it, then make a define.
Naming defines after reserved words is basically a big no in terms of standards compliance. Besides, aren't you the one who insisted nullptr is more than #define nullptr (NULL) anyway? Why fake what you don't have?
Last edited by whiteflags; 03-16-2011 at 06:40 PM.
Just a thought ... out of a few hundred great C++ forums, being a member of at lease two should not be an issue with anyone what-so-ever. Sometime people is not available to help you because they my simply be too busy. So sometime, every now and then, you are FORCE to ask your other ONLY favorite forum in the world. Problem is, one should never join a third or a forth forum just because they talking code that is related to your most important question. So if you are lucky, you at the very lease have two to pray for while waiting for an response. with only two fingers crossed and not ALL four.FYI: Also asked here
btw: This is our subject for next week class