Home > Software engineering >  The error C2146: syntax error: missing '; 'before the identifier' KSPIN
The error C2146: syntax error: missing '; 'before the identifier' KSPIN

Time:11-19

The source code

#include //is the need to refer to the graphics library
#include
Void main ()
{
Initgraph (640, 480);//here and TC is slightly difference between
Circle (200, 200, 100);//painting circle, circle (200, 200), a radius of 100
getch();//press any key to continue
Closegraph ();//close the graphical interface
}

Error below

C: \ program files \ Microsoft visual studio (x86) \ vc98 \ include \ winnt h (1091) : error C2146: syntax error: missing '; 'before the identifier' KSPIN_LOCK '
C: \ program files \ Microsoft visual studio (x86) \ vc98 \ include \ winnt h (1091) : fatal error C1004: unexpected end of file found

Watch the winnt. H header file, not a lack of ";" Problem, but could not find the specific answers on the Internet

CodePudding user response:

16.2 Using Spin Locks
Spin locks are the Kernel - defined, kernel mode - only synchronization mechanisms, exported as an opaque type: KSPIN_LOCK. A spin lock can be 2 protect Shared data or resources from simultaneous access by routines that can execute concurrently and at raised IRQL in Windows NT SMP those.

You are Writing Windows NT Kernel Mode Drivers? -

CodePudding user response:

Initgraph, I don't understand this function, is set the display mode? You draw round with a graphical display, the income, according to the character to use character to toggle display mode,

CodePudding user response:

Graphics. H is the inside of the TC graphics library, if want to use the TC should be used to compile, divided into: pixel function, linear and linear function, polygonal functions, filling function, etc., but when we're using vc6.0 compiler and visual studio 2013 is in the compiler doesn't support graphics. H graphics library, of course, vc6.0 and visual studio 2013 compiler also comes with Microsoft graphics library API (also called Windows API, its function basically included in Windows. H header file), so if we want to use graphics in vc6.0 and visual studio 2013 graphics library? We have two solution,

CodePudding user response:

Mostly their code cuhk brackets do not match
  • Related