Solved

How to use StrFmt in Borland C++ Builder

Posted on 2001-08-07
8
413 Views
Last Modified: 2007-12-19
I've beent trying to format a postcode of the form B17 9BN as B017 9BN using StrFmt.
Could somebody show me how to do this with C++ Builder?

Regards
Mark Tindill
0
Comment
Question by:MTindill
8 Comments
 
LVL 1

Accepted Solution

by:
RideOn earned 20 total points
ID: 6359134
Why do you use StrFmt?
Do you HAVE to use this function?
0
 
LVL 1

Expert Comment

by:RideOn
ID: 6359142
if i'd be you, i would take sprintf
0
 

Author Comment

by:MTindill
ID: 6359784
Whatever works.
0
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 

Author Comment

by:MTindill
ID: 6360414
How do I use "sprintf" then to accomplish the above without having to specify each individual element a character array to match the format specifiers.
i.e sprintf(buffer, "%c0%c%c%c%c%c%c%c\0", <what-goes-here?>);
0
 
LVL 2

Expert Comment

by:LoungeLizard
ID: 6362222
In what format is the postcode? Is it a string of individual characters?
0
 

Author Comment

by:MTindill
ID: 6363404
Yes.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6758268
Has this been resolved or is more needed here?

Moondancer
Community Support Moderator @ Experts Exchange
0
 

Author Comment

by:MTindill
ID: 6766313
Thanks RideOn. Profuse apologies for the "small" delay in awarding points.

Regards
mtindill
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Converting to C# also VS2015 5 128
Header Errors LNK2019, LNK1120 - Unresolved Externals 4 138
Which Linux flavors will this run on? 6 88
What is sub-make ? 2 61
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…
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 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.

809 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