Solved

_vscprintf help

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
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++.

740 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