Ravi shankar
Ravi shankar

Reputation: 2460

programming c++ code in VC++

when I am trying to compile a program in c++ with VC++

first the compiler was not able to locate stdafx.h then I downloaded SDK.

then lots of error started generating e.g.

c:\program files\microsoft visual studio 9.0\vc\include\cstring(25) : warning C4091: '' : ignored on left of 'unsigned int' when no variable is declared c:\program files\microsoft visual studio 9.0\vc\include\cstring(26) : error C2039: 'memcpy' : is not a member of 'std'

there are many such member that I want to use,

such as

std ::size_t; using ::memchr; using ::memcmp; std ::memcpy; std ::memmove; std ::memset; std ::strcat; std ::strchr; std ::strcmp; std ::strcoll; std ::strcpy; std ::strcspn; std ::strerror; std ::strlen; std ::strncat; std ::strncmp; std ::strncpy; std ::strpbrk; std ::strrchr; std ::strspn; std ::strstr; std ::strtok; std ::strxfrm;

is there any way I can modify this code to run with VC++ compiler.

Upvotes: 0

Views: 373

Answers (2)

Sorantis
Sorantis

Reputation: 14722

check if you include header files correctly. Go to Tools -> Options -> Projects and Solutions and check VC Directories. You must include path to SDK into VS directories

Upvotes: 0

Klaim
Klaim

Reputation: 69682

You're missing includes don't you?

Upvotes: 0

Related Questions