Solved

_vscprintf help

Posted on 2004-04-21
2
760 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now