Solved

How to use StrFmt in Borland C++ Builder

Posted on 2001-08-07
8
420 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
[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
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
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!

 

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

751 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