- Remove From My Forums
-
Question
-
I have a simple typedef like this:
typedef void* OurVar;
I know this has worked in other projects, but in this one I am currently working on, when the compiler comes across this I see
error C2144: syntax error : ‘void’ should be preceded by ‘;’
error C4430: missing type specifier — int assumed. Note: C++ does not support default-int
I am not sure where to even look. This is happening with other typedef’s as well.
Answers
-
The error is certainly in the code just above this line.
-
Marked as answer by
Wednesday, April 11, 2012 11:08 PM
-
Marked as answer by
-
On 4/11/2012 2:17 PM, msnhelpsme wrote:
In other words, I want VS’s path from first include file to the one giving the error.
I’m not sure what you want, but see if this helps: Project | Properties | C/C++ | Advanced | Show Includes = Yes
Igor Tandetnik
-
Marked as answer by
msnhelpsme
Wednesday, April 11, 2012 11:07 PM
-
Marked as answer by
Compiling a file that uses OpenGL with Visual C++, when I try to include the gl.h header file I get about 150 unhelpful compile errors:
error C2144: syntax error : ‘void’ should be preceded by ‘;’
error C4430: missing type specifier — int assumed. Note: C++ does not support default-int
error C2146: syntax error : missing ‘;’ before identifier ‘glAccum’
etc.
asked Jan 10, 2009 at 2:24
Just #include <windows.h>
before <gl/gl.h>
or <gl/glu.h>
.
It is needed for some types, such as WINGDIAPI
and APIENTRY
.
ChrisN
16.5k8 gold badges56 silver badges78 bronze badges
answered Jan 10, 2009 at 5:58
starmolestarmole
9647 silver badges6 bronze badges
0
Sounds like you’re including a C header inside a C++ project. Try enclosing your include statement inside:
extern "C" {
#include "gl.h"
}
answered Jan 10, 2009 at 2:37
Ates GoralAtes Goral
136k26 gold badges135 silver badges190 bronze badges
if you use visual c++, make sure you already have the opengl library.
use #include <windows.h>
before the #include <GL/gl.h>
and if you use #include <glut.h>
in your program make sure you are not type like this
#include <GL/glut.h>
, if you type like that it can be error «GL/glut.h no such file or directory»
answered Dec 25, 2011 at 12:12
The first possibility to consider is that the compiler’s messages are actually right. Surely there were line numbers included in those error messages, so have you looked at the offending lines, and some of the lines preceding them, to try to identify what might really be the cause?
Were there any other messages that came before the ones you’ve cited? (A missing header, for instance?) Always start addressing compiler messages from the first one; later ones are sometimes just side effects caused by that.
Can you reproduce the problem in a simple project? Is it enough to just write #include <gl.h>
in an otherwise empty file and try to compile it? Or is there more about this source code that causes the error to occur?
Remember that you’re the one here with access to your code; the questions I’m asking above are the sorts of things you need to consider since you can’t always have someone else debug your code for you.
answered Jan 10, 2009 at 5:50
Rob KennedyRob Kennedy
161k21 gold badges276 silver badges463 bronze badges
- Forum
- Beginners
- openGL
openGL
Hey I am using Microsoft Visual Studio 2010 and I want to learn openGL
I have openGL include files in
C:Program Files (x86)Microsoft SDKsWindowsv7.0AIncludegl
lib files
C:Program Files (x86)Microsoft SDKsWindowsv7.0ALib
and opengl32.dll in windows system32 directory.
But when I #include <glGL.h>
I instantly get heaps of errors.
Some of the errors include;
|
|
What am I doing wrong?
Please provide a minimal example.
What do you mean?
Linking libraries. Project->Settings. Select link tab. In the Objectlibraries field, type either of
these: For Microsoft’s OpenGL: opengl32.lib glu32.lib glut32.lib.
If u are already using glut.h
Comment out the line #include <GLgl.h>. The header file glut.h includes gl.h.
Topic archived. No new replies allowed.
Hi guys,
i have a small question. I have my project and I have I90ControllerDlg.cpp.This is you can say my main. I have another .cpp file called multipoletutorial.cpp that I added to my project tree. I already compile it and everything is ok, so it is compiling the multipoletutorial.cpp file. Now in this file I have a function void cica (void). I tried to call this function in my main program, after I declare it at the begining. When calling it, I set a breackpoint so I can go inside to see what is happening …but it seems that the program when debuging it «changes» automatically the position of the breackpoint to the next line. So I can never go inside.
I will post multipoletutorila.cpp file.
In my main file I wrote like this at the begining of the program
using namespace std;
void cica(void);
So I declared it.
and then I tried to call it
cica ();
or cica(void);
and it gives me error
error C2144: syntax error : ‘void’ should be preceded by ‘)’
So it does not recognize it?
I made another .cpp file and I had a function there and when calling it , it works, but this new one seems not to work.
Please give me a solution.
// Copyright (C) 2003
// Gerhard Neumann (gneumann@gmx.net)
// Stephan Neumann (sneumann@gmx.net)
//
// This file is part of RL Toolbox.
// http://www.igi.tugraz.at/ril_toolbox
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*****************************************************************************************************
Tutorial for the Reinforcement Learning Toolbox. In this example the Pole Balancing task is learned with
a Q-Learning algorithm. For discretization build-in single state discretizer are used.
The task is learned until the agent manages to pole the cart for over 100000 steps or for 500 episodes.
******************************************************************************************************/
#include "stdafx.h"
#include <time.h>
#include "ril_debug.h"
//#include "cmultipolemodel.h"
#include "robotlearning.h"
//#include "robotlearning.cpp"
#include "ctdlearner.h"
#include "cpolicies.h"
#include "cagent.h"
#define one_degree 0.0174532 /* 2pi/360 */
#define six_degrees 0.1047192
#define twelve_degrees 0.2094384
#define fifty_degrees 0.87266
//#define degree 60
//#define time 1000
//#define myforce 0
CMultiPoleAction mywrapper(rlt_real myforce,double degree, short time1)
{
CEnvironmentModel *model1 = NULL;
CAgentStatisticController *detController1 = NULL;
CAbstractStateDiscretizer *discState1 = NULL;
CRewardFunction *rewardFunction1 = NULL;
CAgent *agent1;
CMultiPoleAction myaction(myforce);
//CMultiPoleAction1 myaction();
//time = xxxx;
myaction.TurnDegree(degree, time1);
return myaction;
}
void cica(void)
{
rlt_real myforce;
double degree;
short time1;
CMultiPoleAction myact;
myact = mywrapper(19,60,100);
// initialize the random generator
srand((unsigned int)time((time_t *)NULL));
// variable declaration
CEnvironmentModel *model = NULL;
CAgentStatisticController *detController = NULL;
CAbstractStateDiscretizer *discState = NULL;
CRewardFunction *rewardFunction = NULL;
CAgent *agent;
// create the discretizer with the build in classes
// create the partition arrays
double partitions1[] = {-0.8, 0.8}; // partition for x
double partitions2[] = {-0.5, 0.5}; // partition for x_dot
double partitions3[] = {-six_degrees, -one_degree, 0, one_degree, six_degrees}; // partition for theta
double partitions4[] = {-fifty_degrees, fifty_degrees}; // partition for theta_dot
double partitions5[] = {-fifty_degrees, fifty_degrees}; // partition for theta_dot
// Create the discretizer for the state variables
CAbstractStateDiscretizer *disc1 = new CSingleStateDiscretizer(0, 2, partitions1);
CAbstractStateDiscretizer *disc2 = new CSingleStateDiscretizer(1, 2, partitions2);
CAbstractStateDiscretizer *disc3 = new CSingleStateDiscretizer(2, 7, partitions3);
CAbstractStateDiscretizer *disc4 = new CSingleStateDiscretizer(3, 2, partitions4);
// Merge the 4 discretizer
CDiscreteStateOperatorAnd *andCalculator = new CDiscreteStateOperatorAnd();
andCalculator->addStateModifier(disc1);
andCalculator->addStateModifier(disc2);
andCalculator->addStateModifier(disc3);
andCalculator->addStateModifier(disc4);
// Create the failed state discretizer, which distinguishes the state in "failed" and "not failed"
discState = new CMultiPoleFailedState();
discState->addStateSubstitution(1, andCalculator);
// create the model
//model = new CMultiPoleModel(discState);
model = new CMultiPoleModel();
// iniialise the reward function
/* reward function and model are merged*/
rewardFunction = (CMultiPoleModel *)model;
// create the agent
agent = new CAgent(model);
// create the 2 actions for accelearting the cart and add them to the agent's action set
//CPrimitiveAction *primAction1 = new CMultiPoleAction(10.0, discState);
//CPrimitiveAction *primAction2 = new CMultiPoleAction(-10.0, discState);
CPrimitiveAction *primAction1 = new CMultiPoleAction(10.0);
CPrimitiveAction *primAction2 = new CMultiPoleAction(-10.0);
agent->addAction(primAction1);
agent->addAction(primAction2);
// create the discrete state with the self-coded class
/* not used
discState = new CMultiPoleDiscreteState();
*/
// add the discrete state to the agent's state modifier
// discState must not be modified (e.g. with a State-Substitution) by now
agent->addStateModifier(discState);
// Create the learner and the Q-Function
CFeatureQFunction *qTable = new CFeatureQFunction(agent->getActions(), discState);
CTDLearner *learner = new CQLearner(rewardFunction, qTable);
// initialise the learning algorithm parameters
learner->setAlpha(0.1);
//learner->getQFunction()->setGamma(0.95);
learner->getETraces()->setReplacingETraces(true);
learner->getETraces()->setLambda(0.9);
// add the Q-Learner to the listener list
agent->addSemiMDPListener(learner);
// Create the learners controller
CAgentStatisticController *policy = NULL;
policy = new CQGreedyPolicy(agent->getActions(), qTable);
// set the policy as controller of the agent
agent->setController(policy);
// disable automatic logging of the episode from the agent
agent->setLogEpisode(false);
int steps = 0;
// Learn for 500 Episodes
for (int i = 0; i < 500 && steps < 100000; i++)
{
// Do one training trial, with max 100000 steps
steps = agent->doControllerEpisode(1, 100000);
printf("Episode %d %s with %d stepsn", i, model->isFailed() ? "failed" : "succeded", steps);
}
delete policy;
delete learner;
delete agent;
delete qTable;
delete model;
printf("nn<< Press Enter >>n");
getchar();
};
Open in new window
Hi,
I was trying to compile an OpenGL program in Visual C++ .Net and it generated the following errors.
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1152): error C2144: syntax error : ‘void’ should be preceded by ‘;’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1152): error C2501: ‘WINGDIAPI’ : missing storage-class or type specifiers
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1152): error C2146: syntax error : missing ‘;’ before identifier ‘glAccum’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1152): error C2182: ‘APIENTRY’ : illegal use of type ‘void’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1153): error C2144: syntax error : ‘void’ should be preceded by ‘;’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1153): error C2501: ‘WINGDIAPI’ : missing storage-class or type specifiers
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1153): error C2086: ‘int WINGDIAPI’ : redefinition
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1153): error C2146: syntax error : missing ‘;’ before identifier ‘glAlphaFunc’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1153): error C2182: ‘APIENTRY’ : illegal use of type ‘void’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1153): error C2086: ‘int APIENTRY’ : redefinition
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1154): error C2146: syntax error : missing ‘;’ before identifier ‘GLboolean’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1154): error C2501: ‘WINGDIAPI’ : missing storage-class or type specifiers
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1154): error C2086: ‘int WINGDIAPI’ : redefinition
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1154): error C2146: syntax error : missing ‘;’ before identifier ‘glAreTexturesResident’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1154): error C2371: ‘APIENTRY’ : redefinition; different basic types
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1155): error C2144: syntax error : ‘void’ should be preceded by ‘;’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1155): error C2501: ‘WINGDIAPI’ : missing storage-class or type specifiers
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1155): error C2086: ‘int WINGDIAPI’ : redefinition
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1155): error C2146: syntax error : missing ‘;’ before identifier ‘glArrayElement’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1155): error C2182: ‘APIENTRY’ : illegal use of type ‘void’
c:Program FilesMicrosoft Visual Studio .NET 2003Vc7includeGLgl.h(1155): error C2086: ‘int APIENTRY’ : redefinition
This is only a partial list. The rest of the list includes around 200 errors. I don’t know what’s wrong with it. But I’m sure the error has nothing to do with the actual code, but with the gl.h file.
The program I was trying to compile can be found here
It’s a starter code for a school assignment. I really need to get this working so I can start coding.
Are you including windows.h before the gl.h inclusion?
Ok I just tried including <windows.h> and it still have same error, but it did manage to reduce the number of errors down to around 100.
you have to make sure that you include windows header before any gl header, that includes demo.cpp and polygon.h files.
Change this
#include <iostream>
#include <cstdlib>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <glui.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
into this
#include <GL/glut.h>
#include <iostream>
#include <cstdlib>
#include <glui.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
[edit]
The above refers to demo.cpp…
[/edit]
Quote:Original post by Anonymous Poster
you have to make sure that you include windows header before any gl header, that includes demo.cpp and polygon.h files.
Nope.
Glut.h includes everything you need in the correct order.
Otherwise it couldn’t be cross-platform [wink]
Quote:Original post by darookie
Quote:Original post by Anonymous Poster
you have to make sure that you include windows header before any gl header, that includes demo.cpp and polygon.h files.Nope.
Glut.h includes everything you need in the correct order.
Otherwise it couldn’t be cross-platform [wink]
But he included gl header files before glut.h in demo.cpp and in polygon.h file all he includes is gl.h. So your statemens is zip of value.
Quote:Original post by Anonymous Poster
Quote:Original post by darookie
Quote:Original post by Anonymous Poster
you have to make sure that you include windows header before any gl header, that includes demo.cpp and polygon.h files.Nope.
Glut.h includes everything you need in the correct order.
Otherwise it couldn’t be cross-platform [wink]But he included gl header files before glut.h in demo.cpp and in polygon.h file all he includes is gl.h. So your statemens is zip of value.
The trick is, you don’t need to explicitly include any gl headers when using glut. I didn’t look at the polygon.* files so my advice is to just include glut.h instead of any gl headers, which need OS specific headers, too.
So my statement still holds true and you don’t seem to have used glut lately.
Yours,
Pat.
[edit]
AP: I just checked these files and noticed an error:
LordG, you should not include headers in header files.
Remove the include statements from polygon.h and include
these files (and use glut.h instead of gl.h) in polygon.cpp.
Thanks to the AP for pointing that out for me [wink]
[/edit]
You’ve linked all of the library files, right?
Quote:Original post by CoderGuy
You’ve linked all of the library files, right?
These are compiler errors, not linker errors.
The latter come later [smile].
description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: Compiler errors C2100 through C2199 |
Compiler errors C2100 through C2199 |
04/21/2019 |
|
|
1ccab076-0954-4386-b959-d3112a6793ae |
Compiler errors C2100 through C2199
The articles in this section of the documentation explain a subset of the error messages that are generated by the compiler.
[!INCLUDEerror-boilerplate]
Error messages
Error | Message |
---|---|
Compiler error C2100 | illegal indirection |
Compiler error C2101 | ‘&’ on constant |
Compiler error C2102 | ‘&’ requires l-value |
Compiler error C2103 | ‘&’ on register variable |
Compiler error C2104 | ‘&’ on bit field ignored |
Compiler error C2105 | ‘operator‘ needs l-value |
Compiler error C2106 | ‘operator‘: left operand must be l-value |
Compiler error C2107 | illegal index, indirection not allowed |
Compiler error C2108 | subscript is not of integral type |
Compiler error C2109 | subscript requires array or pointer type |
Compiler error C2110 | ‘+’: cannot add two pointers |
Compiler error C2111 | ‘+’: pointer addition requires integral operand |
Compiler error C2112 | ‘-‘: pointer subtraction requires integral or pointer operand |
Compiler error C2113 | ‘-‘: pointer can only be subtracted from another pointer |
Compiler error C2114 | ‘operator‘: pointer on left; needs integral value on right |
Compiler error C2115 | ‘operator‘: incompatible types |
Compiler error C2116 | function parameter lists differed |
Compiler error C2117 | ‘identifier‘: array bounds overflow |
Compiler error C2118 | negative subscript |
Compiler error C2119 | ‘identifier‘: the type for ‘type‘ cannot be deduced from an empty initializer |
Compiler error C2120 | ‘void’ illegal with all types |
Compiler error C2121 | ‘#’: invalid character: possibly the result of a macro expansion |
Compiler error C2122 | ‘identifier‘: prototype parameter in name list illegal |
Compiler error C2123 | ‘identifier‘: alias templates cannot be explicitly or partially specialized |
Compiler error C2124 | divide or mod by zero |
Compiler error C2125 | ‘constexpr’ is incompatible with ‘token‘ |
Compiler error C2126 | ‘identifier‘ cannot be declared with ‘constexpr’ specifier |
Compiler error C2127 | ‘identifier‘: illegal initialization of ‘constexpr’ entity with a non-constant expression |
Compiler error C2128 | ‘function‘: alloc_text/same_seg applicable only to functions with C linkage |
Compiler error C2129 | static function ‘identifier‘ declared but not defined |
Compiler error C2130 | #line expected a string containing the filename, found ‘token‘ |
Compiler error C2131 | expression did not evaluate to a constant |
Compiler error C2132 | syntax error: unexpected identifier |
Compiler error C2133 | ‘identifier‘: unknown size |
Compiler error C2134 | ‘function‘: call does not result in a constant expression |
Compiler error C2135 | ‘operator‘: illegal bit field operation |
Compiler error C2136 | authoring API contract not allowed |
Compiler error C2137 | empty character constant |
Compiler error C2138 | illegal to define an enumeration without any members |
Compiler error C2139 | ‘class‘: an undefined class is not allowed as an argument to compiler intrinsic type trait ‘trait‘ |
Compiler error C2140 | ‘type‘: a type that is dependent on a generic type parameter is not allowed as an argument to compiler intrinsic type trait ‘trait‘ |
Compiler error C2141 | array size overflow |
Compiler error C2142 | function declarations differ, variable parameters specified only in one of them |
Compiler error C2143 | syntax error: missing ‘token1‘ before ‘token2‘ |
Compiler error C2144 | syntax error: ‘type‘ should be preceded by ‘token2‘ |
Compiler error C2145 | syntax error: missing ‘token‘ before identifier |
Compiler error C2146 | syntax error: missing ‘token‘ before identifier ‘identifier‘ |
Compiler error C2147 | syntax error: ‘token‘ is a new keyword |
Compiler error C2148 | total size of array must not exceed 0xvalue bytes |
Compiler error C2149 | ‘identifier‘: named bit field cannot have zero width |
Compiler error C2150 | ‘identifier‘: bit field must have type ‘int’, ‘signed int’, or ‘unsigned int’ |
Compiler error C2151 | more than one language attribute |
Compiler error C2152 | ‘identifier‘: pointers to functions with different attributes |
Compiler error C2153 | integer literals must have at least one digit |
Compiler error C2154 | ‘type‘: only enumeration type is allowed as an argument to compiler intrinsic type trait ‘trait‘ |
Compiler error C2155 | ‘?’: invalid left operand, expected arithmetic or pointer type |
Compiler error C2156 | pragma must be outside function |
Compiler error C2157 | ‘identifier‘: must be declared before use in pragma list |
Compiler error C2158 | ‘type‘: #pragma make_public directive is currently supported for native non-template types only |
Compiler error C2159 | more than one storage class specified |
Compiler error C2160 | ‘##’ cannot occur at the beginning of a macro definition |
Compiler error C2161 | ‘##’ cannot occur at the end of a macro definition |
Compiler error C2162 | expected macro formal parameter |
Compiler error C2163 | ‘function‘: not available as an intrinsic function |
Compiler error C2164 | ‘function‘: intrinsic function not declared |
Compiler error C2165 | ‘modifier‘: cannot modify pointers to data |
Compiler error C2166 | l-value specifies const object |
Compiler error C2167 | ‘function‘: too many actual parameters for intrinsic function |
Compiler error C2168 | ‘function‘: too few actual parameters for intrinsic function |
Compiler error C2169 | ‘function‘: intrinsic function, cannot be defined |
Compiler error C2170 | ‘identifier‘: not declared as a function, cannot be intrinsic |
Compiler error C2171 | ‘operator‘: illegal on operands of type ‘type‘ |
Compiler error C2172 | ‘function‘: actual parameter is not a pointer: parameter number |
Compiler error C2173 | ‘function‘: actual parameter is not a pointer: parameter number, parameter list number |
Compiler error C2174 | ‘function‘: actual parameter has type ‘void’: parameter number, parameter list number |
Compiler error C2175 | ‘locale‘: invalid locale |
Compiler error C2176 | a return statement cannot appear in the handler of a function-try-block associated with a constructor |
Compiler error C2177 | constant too big |
Compiler error C2178 | ‘identifier‘ cannot be declared with ‘specifier‘ specifier |
Compiler error C2179 | ‘type‘: an attribute argument cannot use type parameters |
Compiler error C2180 | controlling expression has type ‘type‘ |
Compiler error C2181 | illegal else without matching if |
Compiler error C2182 | ‘identifier‘: illegal use of type ‘void’ |
Compiler error C2183 | syntax error: translation unit is empty |
Compiler error C2184 | ‘type‘: illegal type for __except expression |
Compiler error C2185 | ‘identifier‘: illegal based allocation |
Compiler error C2186 | ‘operator‘: illegal operand of type ‘void’ |
Compiler error C2187 | syntax error: ‘token‘ was unexpected here |
Compiler error C2188 | ‘number‘: too big for wide character |
Compiler error C2189 | ‘alignas’ attribute cannot be applied to a bit-field, a function parameter, an exception declaration, or a variable declared with ‘register’ storage class |
Compiler error C2190 | first parameter list longer than second |
Compiler error C2191 | second parameter list longer than first |
Compiler error C2192 | parameter ‘number‘ declaration different |
Compiler error C2193 | ‘identifier‘: already in a segment |
Compiler error C2194 | ‘identifier‘: is a text segment |
Compiler error C2195 | ‘identifier‘: is a data segment |
Compiler error C2196 | case value ‘value‘ already used |
Compiler error C2197 | ‘function‘: too many arguments for call |
Compiler error C2198 | ‘function‘: too few arguments for call |
Compiler error C2199 | syntax error: found ‘identifier (‘ at global scope (was a declaration intended?) |
See also
C/C++ Compiler and build tools errors and warnings
Compiler errors C2000 — C3999, C7000 — C7999