Solved

_vscprintf help

Posted on 2004-04-21
2
776 Views
Last Modified: 2007-12-19
I'm trying to make a printf like function for writing output to a log file. I was looking at MSDN for some help and found the _vscprintf function for making the buffer large enough to hold the data. It says it's in stdio.h, but my stdio.h does not have that function. I've searched the entire include folder for the function and found nothing except for one in the platform sdk for win64 stuff. I'm using Visual C++ 6.0. Has anyone else had a problem like this? Any ideas on how to get it working? Anything would be appreciated.
0
Comment
Question by:Veratil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
efn earned 250 total points
ID: 10885202
Although Microsoft says that function is in all versions of the C run-time libraries (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/vclrf_vscprintf_vscwprintf.asp), it was new in the .net release.  So you will need to upgrade your compiler or use a different technique.  I don't have any idea better than scanning the string adding up estimates of sizes of the parts.

--efn
0
 

Author Comment

by:Veratil
ID: 10885228
:( I see... Well thank you for the quick answer. I'll just have to get .NET then. Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question