Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my eror and I can not fix it.
Visual Studio 2015 ( C++ project )
Error	C1189	#error:  Macro definition of snprintf conflicts with Standard Library function declaration	test_project	c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\stdio.h	1927	


Severity	Code	Description	Project	File	Line	Suppression State
Error	C2084	function 'int _snprintf(char *const ,const std::size_t,const char *const ,...)' already has a body	test_project	c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\stdio.h	1955	


8>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(251): error C2059: syntax error: '::'

8>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(32): error C2589: '(': illegal token on right side of '::'

Severity	Code	Description	Project	File	Line	Suppression State
Error	C2059	syntax error: '::'	z_libutils_gui_windows	c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath	67	


What I have tried:

develop openGl project with VC 2015
Posted
Updated 19-Oct-16 22:19pm
v2
Comments
[no name] 19-Oct-16 15:15pm    
And you think we can tell you what is wrong with your code without seeing it?
jeron1 19-Oct-16 15:52pm    
Visual Studio 2015 error or your error? I guessing yours.
Afzaal Ahmad Zeeshan 19-Oct-16 18:25pm    
The error is not even of Visual Studio 2015, the error tells you that you are not following a standard, part of the error is, Macro definition of snprintf conflicts with Standard Library function declaration.

There are many other errors in the list too. You need to fix them, or learn C programming.

1 solution

The compiler tell you the truth: You cant define some macro (or function) like snprintf, because the name is already usd in the standard library.

The names have to be unique to get language conform.

Tip: find a mate to learn the language better ;-)
 
Share this answer
 

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