473,394 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How can I manipulate text using managed C++

I am using multiple arrays to make tables of rows and columns.

When using C++ I was able to manipulate texts by using

cout << setw(3) << .... using directives iomanip.h and iostream.h.

Now, when using managed C++, How can we do the same manipulation by with
Console::Write() and Console::WriteLine()?


Feb 27 '06 #1
3 1497
Hi Allen,

When using C++ I was able to manipulate texts by using

cout << setw(3) << .... using directives iomanip.h and iostream.h.

Now, when using managed C++, How can we do the same manipulation by with
Console::Write() and Console::WriteLine()?


You can use formatting strings as part of your WriteLine() statements, which
you'll find documented here:

http://msdn.microsoft.com/library/de...ttingtypes.asp

for example, if you were to print an integer value in hex, right-aligned on
a 8 digit boundary you might do something like:

Console::WriteLine("{0,8:X}", intValue);
--
Tomas Restrepo
to****@mvps.org
http://www.winterdom.com/
Feb 27 '06 #2
Hi Mr. Restrepo,

I appreciate your help> I will try it. I like your Website.

"Tomas Restrepo (MVP)" <to****@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Allen,

When using C++ I was able to manipulate texts by using

cout << setw(3) << .... using directives iomanip.h and iostream.h.

Now, when using managed C++, How can we do the same manipulation by with
Console::Write() and Console::WriteLine()?


You can use formatting strings as part of your WriteLine() statements,
which you'll find documented here:

http://msdn.microsoft.com/library/de...ttingtypes.asp

for example, if you were to print an integer value in hex, right-aligned
on a 8 digit boundary you might do something like:

Console::WriteLine("{0,8:X}", intValue);
--
Tomas Restrepo
to****@mvps.org
http://www.winterdom.com/

Feb 28 '06 #3
I think you might look want to look at the StreamWriter and StreamReader
classes...

[==P==]

"Allen Maki" <al*********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I am using multiple arrays to make tables of rows and columns.

When using C++ I was able to manipulate texts by using

cout << setw(3) << .... using directives iomanip.h and iostream.h.

Now, when using managed C++, How can we do the same manipulation by with
Console::Write() and Console::WriteLine()?



Mar 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stewart | last post by:
Dear comp.lang.javascript, I have more than once wanted to manipulate the contents of select boxes dynamically, whilst the boxes contain <optgroup> tags. Manipulation of a select box containing...
14
by: Eric Lindsay | last post by:
I've seen a page using display, and especially display table that did some neat things with boxes, but basically it only worked with Mozilla browsers. Fell over fairly badly with Opera and Safari...
1
by: Sam Learner | last post by:
Hello, you guys have been very helpfull in responding to questions from the newgroup community and thank everyone for your contributions. I have a Question, I am developping a software to do clean...
7
by: support | last post by:
Hi, I am trying to change the text of a Command button using the Windows API Function SetWindowText, which I have declared as follows: <DllImport("User32")_ Public Function...
5
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record...
1
by: Ron | last post by:
I would like to write a small program to manipulate this XML: http://www.keepitsimplekid.com/xml/Ad00304.xml What I want the program to do. it would look at all.xml documents in a directory...
1
by: hsemhsem9035 | last post by:
I've just about managed to get excel to delete a character/characters in the middle of a cell using visual basic using the following code: With Cells(1, 1) .Characters(3, 2).Delete End With...
2
by: DC | last post by:
Hi, I am writing a "print control" routine which expects the id of a control and will then make every element but the one that is supposed to be printed invisible (only by using "display: none"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.