Solved

How to use StrFmt in Borland C++ Builder

Posted on 2001-08-07
8
408 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

867 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

22 Experts available now in Live!

Get 1:1 Help Now