Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
2.00/5 (4 votes)
See more:
Hi
I am getting build error ; Error C2059 syntax error: 'string'
for Debug 64 in visual studio 2019. But its passing in Release 64.

suspected code is mentioned below.

static void* (operator new)(size_t sz)
{
   // code
}


Thanks in advance for inputs.

What I have tried:

Changed the project properties similar to release 64 build, in that case its passing.
But in debug 64 its failing.
Posted
Comments
Rick York 31-Mar-22 10:54am    
What is the error message you receive?
Dave Kreskowiak 31-Mar-22 11:24am    
Well, that single line of code you posted cannot generate that error. You have to post the code around the line where the error is being thrown. It's possible you missed a semicolon somewhere.
Shao Voon Wong 1-Apr-22 0:30am    
Your error message mentioned syntax error: 'string' but the code snippet you posted does not have 'string'. Please post the actual source code with 'string' so that we can fix it for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900