Solved

How to use StrFmt in Borland C++ Builder

Posted on 2001-08-07
8
403 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
Comment Utility
Why do you use StrFmt?
Do you HAVE to use this function?
0
 
LVL 1

Expert Comment

by:RideOn
Comment Utility
if i'd be you, i would take sprintf
0
 

Author Comment

by:MTindill
Comment Utility
Whatever works.
0
 

Author Comment

by:MTindill
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Expert Comment

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

Author Comment

by:MTindill
Comment Utility
Yes.
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
Has this been resolved or is more needed here?

Moondancer
Community Support Moderator @ Experts Exchange
0
 

Author Comment

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

Regards
mtindill
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

762 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

9 Experts available now in Live!

Get 1:1 Help Now