does it make difference order of include headers?

in VS studio 2017 when i change order of include headers like this:

#include "gplib.h"
#include "stdafx.h"

it gives errors

but if i first include "stdafx.h"

than it works perfect.

Does it make any difference order of included files?
Hello gpapashvili,

Welcome to the forum.

Yes, sometimes it does make difference. Usually no. With VS the first header file it needs to see is the "stdafx.h" after that order does not make that much difference. Just a quirk of VS.

There are some rare occasions when you may find the the order of header files will make a difference.

Hope that helps,

Andy
Topic archived. No new replies allowed.