I never knew that near and far were reserved until I made a struct for bounding boxes like this:

struct boundingBox
{
    float near,  far;
    float left,right;
    float top,bottom;
};

Does anybody know what near and far do, because I got the error that the declaration does not declare anything. I solved my problem with a simple rename, but I was also wondering if there was a way to 'turn off' near and far being reserved. My struct is now this in case you are wondering:

struct boundingBox
{
    float front,back;
    float left,right;
    float top,bottom;
};

near and far were keywords used to modify pointers back when the segmented memory architecture was both used and transparent. Near pointers would access the current segment while far pointers could reach across segments. Compilers that supported such keywords probably still support them for backward compatibility, but on modern systems they're pretty useless as everyone uses or at least simulates a flat memory model now.

Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.