Tutorial How to fix some errors with C++ (winNT.h)

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

torgomanz10

Newbie
Full Member
Jan 26, 2014
9
122
0
Hello guys!

Today, I'll be teaching you how to fix a specific errors in Visual C++ 2008, 2010 express and even ultimate, like these below:


1>------ Build started: Project: Console Trainer, Configuration: Debug Win32 ------
1> Main.cpp
1>c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(290): error C2146: syntax error : missing ';' before identifier 'PVOID64'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(290): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(8993): error C2146: syntax error : missing ';' before identifier 'Buffer'
1>c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(8993): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(8993): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========




First Double click on the first error, which is looking like this​

1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(236) : error C2146: syntax error : missing ';' before identifier 'PVOID64'


It will automatically takes you to line 290 which is down below!​

typedef void * POINTER_64 PVOID64;​

Then change it to:​

typedef void * __ptr64 PVOID64;​

Then Save it (CTRL+S)
Build or Run it ;)






Thats it! Hope it Helped!
EnjoY​

Turjumanz!​
 

Syperus

RTFM
Meme Tier VIP
Dank Tier Donator
Oct 29, 2012
432
2,638
7
Also maybe explain whats causing the error and why you need to change the code to what you provided? Would make for a decent little tutorial. Just a thought. :)
 

NTvalk

Hacker
Meme Tier VIP
Jul 6, 2013
499
3,108
8
I generally don't recommend changing winnt.h. What you can do is include windows.h before you include winnt.h (or replace it).
Because POINTER_64 is defined in windows.h:
C++:
#define POINTER_64 __ptr64
Including winnt.h without windows.h results in POINTER_64 being undefined.
 

torgomanz10

Newbie
Full Member
Jan 26, 2014
9
122
0
tried this... didnt work
I generally don't recommend changing winnt.h. What you can do is include windows.h before you include winnt.h (or replace it).
Because POINTER_64 is defined in windows.h:
C++:
#define POINTER_64 __ptr64
Including winnt.h without windows.h results in POINTER_64 being undefined.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Similar threads

Community Mods