Home > error c2146 > error c2146 c2501

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 –pjc50 Oct 4 '11 at 15:56 It is in the cpp but when I include windows.h in the this header file than there are 1000 more errors within Windows own header files. –jdl Oct 4 '11 at 15:59 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted According to the errors, DWORD is not recognized. Are you sure you are including windows.h? share|improve this answer answered Oct 4 '11 at 15:57 Jeest 661 add a comment| up vote 0 down vote Add #include to the beginning of your code... share|imp

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' being compiled c:\documents and error c2146 settings\xpmuser\desktop\client\filemgr.h(157) : error C2501: 'CHSEL_STREAM' : missing storage-class or type specifiers c:\documents and settings\xpmuser\desktop\client\filemgr.h(158) : see reference to class template instantiation 'TFileMgr' being compiled c:\documents and settings\xpmuser\desktop\client\filemgr.h(157) : error C2501: 'm_hsel' : missing storage-class or type specifiers c:\documents and settings\xpmuser\desktop\client\filemgr.h(158) : see reference to class template instantiation 'TFileMgr' being compiled Error executing cl.exe. error c2146 c2501 GM103p_t040407.exe - 3 error(s), 0 warning(s) Filemgr.h // FileMgr.h: interface for the CFileMgr class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_FILEMGR_H__8410F295_2C38_46C6_ACE6_EE7F1880660D__INCLUDED_) #define AFX_FILEMGR_H__8410F295_2C38_46C6_ACE6_EE7F1880660D__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 /////////////////////////////////////////////////////////////////////////////// // È*ÀÏ °ü·Ã Ŭ·¡½º template class TFileMgr { typedef map hash; typedef map check; typedef map::iterator index; union { struct { __int16 m_nIndex; __int16 m_nMagic; }; DWORD m_dwHandle; }; //020808 YGI --------------- int m_nClassSize; // sizeof( T ) int m_nMarkSize; // ¸¶Å· ÇÒ µ¥ÀÌŸ°¡ 100 ¹ÙÀÌÆ®°¡ ³ÑÀ¸¸é 100 ¹ÙÀÌÆ®·Î Á¦ÇÑÇÑ´Ù. T *m_pCommon; int m_nCommonIndex; // °°Àº À妽º·Î µé¾î¿À¸é ÀÖ´Â °Å ¾²ÀÚ. char *m_pMark; //------------------------------ public: TFileMgr() { Create(); } ~TFileMgr() { Destroy(); } public: bool Load(const char* pFile); bool Load(int nIndex, const char* pFile); bool LoadFromClass(int nIndex, T *pData, short int check_sum ); bool Save(const char* pFile); public: void Create() { //020808 YGI ------------------ m_pCommon = new T; m_nClassSize = sizeof( T ); m_nMarkSize = (m_nClassSize >100)?100:m_nClassSize; m

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 and not winspool.hthen your winspool.h is either corrupted or you define or includesomething unappropriate before it. As it complains about DWORDi would suspect that you don't include the proper header.In other case.. post the relevant winspool.h and your include lineshere so we can have a closer look.- Sten d***@rheal.com 2005-02-01 15:02:18 UTC PermalinkRaw Message Hi,here is the content of winspool.h/*++Copyright (c) 1990-1996 Microsoft CorporationModule Name:WinSpool.hAbstract:Header file for Print APIsRevision History:--*/#ifndef _WINSPOOL_#define _WINSPOOL_#ifdef __cplusplusextern "C" {#endif#ifdef _WINUSER_#include #endiftypedef struct _PRINTER_INFO_1A {DWORD Flags;LPSTR pDescription;LPSTR pName;LPSTR pComment;} PRINTER_INFO_1A, *PPRINTER_INFO_1A, *LPPRINTER_INFO_1A;typedef struct _PRINTER_INFO_1W {DWORD Flags;LPWSTR pDescription;LPWSTR pName;LPWSTR pComment;} PRINTER_INFO_1W, *PPRINTER_INFO_1W, *LPPRINTER_INFO_1W;#ifdef UNICODEtypedef PRINTER_INFO_1W PRINTER_INFO_1;typedef PPRINTER_INFO_1W PPRINTER_INFO_1;typedef LPPRINTER_INFO_1W LPPRINTER_INFO_1;#elsetypedef PRINTER_INFO_1A PRINTER_INFO_1;typedef PPRINTER_INFO_1A PPRINTER_INFO_1;typedef LPPRINTER_INFO_1A LPPRINTER_INFO_1;#endif // UNICODEtypedef struct _PRINTER_INFO_2A {LPSTR pServerName;LPSTR pPrinterName;LPSTR pShareName;LPSTR pPortName;LPSTR pDriverName;LPSTR pComment;

 

Related content

compiler error c2146

Compiler Error C table id toc tbody tr td div id toctitle Contents div ul li a href Error C Syntax Error Missing Before Identifier winapi a li li a href Error C Syntax Error Missing Before Identifier rgclsidallowed a li li a href Error C Missing Type Specifier a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners relatedl ISV Startups TechRewards Events Community Magazine Forums Blogs error c syntax error missing before identifier pvoid Channel Documentation APIs and reference Dev centers Retired content Samples

c 2146 error

C Error table id toc tbody tr td div id toctitle Contents div ul li a href Error C Syntax Error Missing Before Identifier Rgclsidallowed a li li a href Missing Before Identifier C Struct a li li a href Error C Missing Type Specifier a li ul td tr tbody table p here for a quick overview of the site relatedl Help Center Detailed answers to any questions you error c syntax error missing before identifier might have Meta Discuss the workings and policies of this error c visual studio site About Us Learn more about Stack Overflow the

c error c2146

C Error C table id toc tbody tr td div id toctitle Contents div ul li a href Error C Visual C a li li a href Error C Syntax Error Missing Before Identifier winapi a li li a href Error C Syntax Error Missing Before Identifier rgclsidallowed a li li a href Error C a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft relatedl Imagine Microsoft Student Partners ISV Startups TechRewards p h id Error C Visual C p Events Community Magazine Forums Blogs Channel Documentation APIs and

c2146 error

C Error table id toc tbody tr td div id toctitle Contents div ul li a href Error C a li li a href Error C a li li a href Error C a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups relatedl TechRewards Events Community Magazine Forums Blogs Channel error c Documentation APIs and reference Dev centers Retired content Samples We re sorry The p h id Error C p content you requested has been removed You ll be auto redirected in

error c2146 syntax error missing ' ' before identifier

Error C Syntax Error Missing ' ' Before Identifier table id toc tbody tr td div id toctitle Contents div ul li a href Error C Syntax Error Missing Before Identifier rgclsidallowed a li li a href Error C Missing Type Specifier Int Assumed Note C Does Not Support Default Int a li li a href String Error C Syntax Error Missing Before Identifier a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers relatedl to any questions you might have Meta Discuss the error c syntax error missing before

error c2146 error c2501

Error C Error C p and get tips solutions from a community of IT Pros Developers It's quick relatedl easy error C and error C P n a Tim I lpctstr undeclared identifier created a header file including a Node Class and a NodeList Class class Node lpctstr include file Node next class NodeList Node first Node last I wanna declare a NodeList inside the Node but since NodeList is declared after Node it gives me this error class Node Node next NodeList list I get error C syntax error missing ' ' before identifier 'list' error C 'Node list'

error c2146 syntax error missing before identifier hinternet

Error C Syntax Error Missing Before Identifier Hinternet table id toc tbody tr td div id toctitle Contents div ul li a href Error C Syntax Error Missing Before Identifier Pvoid a li li a href Error C Syntax Error Missing Before Identifier Net iftype a li li a href Error C Syntax Error Missing Before Identifier rgclsidallowed a li li a href C Wininet a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have relatedl Meta Discuss the workings and policies of this

error c2146 error c4430

Error C Error C p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies relatedl 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 million programmers just like you helping each other Join them it only takes a minute Sign up Error C and Error C Visual Studio

error c2146 missing

Error C Missing table id toc tbody tr td div id toctitle Contents div ul li a href Error C Syntax Error Missing Before Identifier winapi a li li a href Error C Syntax Error Missing Before Identifier rgclsidallowed a li li a href Error C C a li li a href Error C Syntax Error Missing Before Identifier a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups relatedl TechRewards Events Community Magazine Forums Blogs Channel error c syntax error missing before identifier

error c2146 missing before identifier

Error C Missing Before Identifier table id toc tbody tr td div id toctitle Contents div ul li a href Error C Syntax Error Missing Before Identifier winapi a li li a href Error C Syntax Error Missing Before Identifier contextrecord a li ul td tr tbody table p 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 relatedl this site About Us Learn more about Stack Overflow the error c syntax error missing before identifier company Business Learn more about hiring developers or

error c2146 visual studio

Error C Visual Studio table id toc tbody tr td div id toctitle Contents div ul li a href Error C Syntax Error Missing Before Identifier Rgclsidallowed a li li a href Missing Before Identifier C Struct a li li a href Error C Undeclared Identifier C a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel Documentation relatedl APIs and reference Dev centers Retired content Samples We re sorry error c c The content you requested

error c2146 pvoid64

Error C Pvoid table id toc tbody tr td div id toctitle Contents div ul li a href Pointer a li ul td tr tbody table p here for a quick overview of the site relatedl Help Center Detailed answers to any questions you pvoid undefined might have Meta Discuss the workings and policies of this winnt h errors site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or p h id Pointer p posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack

error c2146 syntax error missing

Error C Syntax Error Missing table id toc tbody tr td div id toctitle Contents div ul li a href Error C Syntax Error Missing Before Identifier iwebbrowser a li li a href Error C Syntax Error Missing Before Identifier mmversion a li li a href Error C Syntax Error Missing Before Identifier hinternet a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you relatedl might have Meta Discuss the workings and policies of error c syntax error missing before identifier fd this site About Us

error c2146

Error C table id toc tbody tr td div id toctitle Contents div ul li a href Error C a li li a href Error C a li li a href C Syntax Error Missing Before Identifier a li li a href Error C Pvoid a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel relatedl Documentation APIs and reference Dev centers Retired content Samples We re p h id Error C p sorry The content you

error c2146 in

Error C In table id toc tbody tr td div id toctitle Contents div ul li a href Error C a li li a href Error C a li li a href Error C a li li a href Error C String a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators relatedl Students Microsoft Imagine Microsoft Student Partners ISV error c Startups TechRewards Events Community Magazine Forums Blogs Channel Documentation p h id Error C p APIs and reference Dev centers Retired content Samples We re sorry The content you requested