If you write 'using namespace std;' it defeats the purpose of having namespaces really, and introduces a greater possibility of name conflicts, along with namespace pollution.
Some considerations:
1. Check the result of the insertion operation to see whether input was valid or not. If input was invalid, the stream sets the fail() bit and enters an invalid state, but the variable doesn't contain any usable value consequently either, and the stream still contains junk data that remains there.
2. Use more functions to separate things better
3. instead of writing 'std::cout << '\n';' in each code branch, you could remove all of them, and write it at the end of the loop after the switch statement to produce the same effect with less code written. Repeated code is not good.
4. You have std::cin.get() and return 0 after the while loop, which will never be executed because of the std::exit(0) call you have which make them both redundant lines of code
5. You've included <windows.h> why not use the actual predefined identifiers instead of their numeric values when you call the IsProcessorFeaturePresent function? Ex: IsProcessorFeaturePresent(PF_PAE_ENABLED), etc...
6. Why do you need all of these variables:
Code:
int PAE_Support;
int ProcessorChannel_Support;
int NXBit_Support;
You only use them to set the return from the function call, and they are only used once each to determine whether a feature is present or not. Instead, you could have just put the function within the if statement conditional, or used ONE variable to hold the return value, and use that to check what to output to stdout. Ex: *with better formatting; not all on a single line of course
Code:
if (IsProcessorFeaturePresent(PF_PAE_ENABLED)) { ... } else { ... }
7. The return of the function is already a BOOL -> you shouldn't have to compare to 1 with the == operator (see example in code snippet above where I call the function within the if statement conditional directly).
8. If you call std::exit(), no further code will be executed, therefore a break; statement is redundant here:
Code:
std::exit(EXIT_SUCCESS);
break;
Keep up the good work though :)