Solved

_vscprintf help

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

760 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

20 Experts available now in Live!

Get 1:1 Help Now