It seems even if I place


at the top of my C++ source files, if the warning level is set to 3 or 4 I still get all the warnings. Is this the way it is supposed to be? I like to have my warning levels set fairly high to help me catch stuff, but I'd like to eliminate the strcpy and other stuff that brings up these warnings. Any suggestions?

The best place is project->settings->preprocessor and set the flag there.

Thanks Salem. I'll try that. I'm new to the latest version of Visual Studio (just bought 2008 Pro), so I'm trying to find the best way to do things yet.

This is useless. I'm going from an earlier version to a new version of Visual Studio and the code has to still be compiled back on the old version.

commented: boring 1-post drive-by whinger -4

> I'm going from an earlier version to a new version of Visual Studio and the code has to still be compiled back on the old version.
And your question is what?
Did you read any of the thread, or did you just see the title and blast away?

Well, that doesn't cause the compilation to fail; it just causes piles of blasted warnings. I've been satisfactorily using Salem's suggestion ever since with no problems.

I tend to not use Visual Studio though for reasons such as this. Its basically a pain the whole routine one must go through to use it. My routine to set up a project is to first tell it not to make Debug builds, because I don't use debuggers. That takes a number of mouse clicks. Then I've got to sift through the various configuration options to paste the CRT_SECURE_NO_WARNINGS in the right place. Might be a few more things that need done too, depending if I want to use ansi instead of UNICODE. And of course the whole thing is slow and ponderous because its based on bloatware from Microsoft.

Of course, the ultimate solution to the CRT_SECURE_NO_WARNINGS is to use the SECURE versions of the string buffer minipulation routines I use so much and not the 'insecure' versions I've grown accustomed to since the early stone age. But hey! I hate to change! Anyway, about all I use C++ for is Windows CE programs and playing with COM. The data recorders my Windows CE programs run on aren't networked or connected to the internet so its a non point.

For reasons such as this though I prefer other development environments. I needed the Visual Studio software and I'm glad I have it. When I have a choice though I use something else.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.