Error C2146 C2501
the start my "innocence" in C++. :cheesy: I did some "C" progs but I ran over a C++ code which I am supposed to modify. Modifications are not hard, but it is hard to get a compilation. :sad: I don't know what compiler had been originally used because these folks are long gone ... I am including the code (minus functions) and the errors hoping that someone could help me. Many Thnks and sorry for the lenghty message ... Vio =================================> LIST OF ERRORS: line 49 has been marked below with "-----" dashes --------------------Configuration: nievio - Win32 Debug-------------------- Compiling... nievio.cpp F:\nie\Parser\nievio.cpp(49) : error C2146: syntax error : missing ';' before identifier 'oedits' F:\nie\Parser\nievio.cpp(49) : error C2501: 'edits' : missing storage-class or type specifiers F:\nie\Parser\nievio.cpp(49) : fatal error C1004: unexpected end of file found Error executing cl.exe. nievio.obj - 3 error(s), 0 warning(s) ==================================================================================================== ==================================================================================================== // #include "stdafx.h" #define _MAIN_ #define _NIE_ #define TRUE 1 #define FALSE 0 #define RECSIZE 400 #include "nie.h" #include "edits.h" #include "gpmsxref.h" struct _record1 rec_1; struct _record2 rec_2; struct _record3 rec_3; struct _record4 rec_4; struct _record5 rec_5; struct _record6 rec_6; struct _record7 rec_7; struct _record8 rec_8; struct _record9 rec_9; struct _record10 rec_10; int E_O_F; /*************************** MAINTENANCE HISTORY **************************/ /* */ /* */ /**************************************************************************/ #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // The one and only application object CWinApp theApp; using namespace std; edits oedits;
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just https://www.daniweb.com/programming/software-development/threads/5328/ms-visual-6-0-error-c2146-c2501 like you, helping each other. Join them; it only takes a minute: Sign up c++ header file errors? up vote 0 down vote favorite (Visual Studio c++ 6.0) .\app.h(69) : error C2146: syntax error : missing ';' before identifier 'IsProcessRunning' .\app.h(69) : error C2501: 'DWORD' : missing storage-class or type specifiers .\app.h(69) : error C2061: syntax error http://stackoverflow.com/questions/7650643/c-header-file-errors : identifier 'LPCTSTR' .\app.h(70) : error C2061: syntax error : identifier 'LPCTSTR' Not sure why these errors? Why the syntax error? DWORD and LPCTSRT are recognized. virtual BOOLEAN DoNew( void ); DWORD IsProcessRunning(LPCTSTR procname); bool TerminateProcess(LPCTSTR procname); void UpdateControllerStatus( void ); visual-c++ share|improve this question asked Oct 4 '11 at 15:53 jdl 2,503948102 You've forgotten to include a definition for DWORD and LPCTSTR; probably missing #include
Visual Studio Languages , Windows Desktop Development > Visual C++ Question 0 Sign in https://social.msdn.microsoft.com/Forums/vstudio/en-US/38ec1218-8739-4d3c-afbe-451bd7e82294/error-c2146-syntax-error-missing-before-identifier-mhsel?forum=vcgeneral to vote Hello, I'm trying to compile this game in http://comp.os.ms-windows.programmer.win32.narkive.com/ueXC4Cm3/compile-error-c2146-c2501 vs 6.0, How ever! When I try to compile it I get errors. Output. :\documents and settings\xpmuser\desktop\client\filemgr.h(157) : error C2146: syntax error : missing ';' before identifier 'm_hsel' c:\documents and settings\xpmuser\desktop\client\filemgr.h(158) : see reference to class template instantiation 'TFileMgr
files\microsoft visual studio\vc98\include\winspool.h(29) :error C2146: syntax error : missing ';' before identifier 'Flags'c:\program files\microsoft visual studio\vc98\include\winspool.h(29) :error C2501: 'DWORD' : missing storage-class or type specifiersc:\program files\microsoft visual studio\vc98\include\winspool.h(29) :error C2501: 'Flags' : missing storage-class or type specifiersc:\program files\microsoft visual studio\vc98\include\winspool.h(30) :error C2146: syntax error : missing ';' before identifier'pDescription'c:\program files\microsoft visual studio\vc98\include\winspool.h(30) :error C2501: 'LPSTR' : missing storage-class or type specifiersAny information provided will be greatly appreciated.Thanks in advance,Debu Sten Westerback 2005-02-01 14:06:54 UTC PermalinkRaw Message Post by Debu DasHi,when i try to compile i get this error messages, is this ainstallation issue or something?error C2146: syntax error : missing ';' before identifier 'Flags'error C2501: 'DWORD' : missing storage-class or type specifierserror C2501: 'Flags' : missing storage-class or type specifierserror C2146: syntax error : missing ';' before identifier'pDescription'error C2501: 'LPSTR' : missing storage-class or type specifiersIf you got it while including