Solved

_vscprintf help

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

734 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