Solved

How to use StrFmt in Borland C++ Builder

Posted on 2001-08-07
8
425 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
Industry Leaders: 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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 be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

623 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