[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Formatting Characters to Uppercase - ios::?

Posted on 1998-07-07
8
Medium Priority
?
279 Views
Last Modified: 2010-04-01
What part of <iostream.h>'s ios class (if that's where it resides) will allow me to convert characters read from
an ordinary text file to all uppercase? I've seemingly searched everywhere(I'm sure
it exists *somewhere*.  ;)

Jim
0
Comment
Question by:jnowlin
[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
  • 4
  • 2
  • 2
8 Comments
 

Expert Comment

by:kashif063098
ID: 1167353
Why don't you use towupper() ?
what about if i tell you win32 api function would it work for you ?



0
 
LVL 2

Accepted Solution

by:
VEngineer earned 200 total points
ID: 1167354
If you are trying to do non-windows programming:

The function toupper is part of the standard library, but is not part of iostream class.  I believe it is part of another library.. ctype.h.  I'll check and get back to you on this.
0
 

Expert Comment

by:kashif063098
ID: 1167355
YOU CAN USES WIN32 API FUNCTION 'CHARUPPER()' TO CONVERT CHARS FROM LOWER CASE TO UPPER CASE
give a try


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!

 
LVL 2

Expert Comment

by:VEngineer
ID: 1167356
If you are using an older implementation, it will be in stdlib.h
If you plan on using the new standard library, it will be in ctype.h

In Visual C++, the function is int toupper(int ch)
In Borland, I think it is called int to_upper(int ch)

Although it says int in the header, you can use chars since they are based off of ints.

If you are doing win32 api or mfc programming, kashif's suggestion will work better
0
 

Author Comment

by:jnowlin
ID: 1167357
Thanks VEngineer and kashif,
I thought that that might of been the function but I was trying to think in terms
of C++ objects and a standard library function, much the same as ios::toupper().
I'm trying to learn C++ in DOS for the time being so it looks like my Borland
Turbo C++ 3.0 will have this in <ctype.h>

Jim Nowlin
0
 
LVL 2

Expert Comment

by:VEngineer
ID: 1167358

It appears you are learning C++.  I tutor for several C++ courses and if you have any questions, feel free to e-mail me at uva_swinger@yahoo.com

Earlier you asked about a good C++ book.. Let me strongly suggest Cohoon and Davidson's "C++ Program Design"  
0
 

Author Comment

by:jnowlin
ID: 1167359
Yeah, that's me, learning C++. Thanks for the Email address, I may take you up
on the offer. I have so many C++ books but I don't have Cohoon and Davidson's
(I don't think so, anyway). Does it come with code on CD?
Jim
0
 
LVL 2

Expert Comment

by:VEngineer
ID: 1167360
Cohoon and Davidson comes with a disk with the code on it.  The only problem I foresee is that the graphics programming (one or two chapters) requires a more recent compiler.  If you already have enough good books, I say stick with those for a while.

The good thing about Cohoon and Davidson is that they really stress design and they explain _why_ things work, not just _how_ to do it or give a long explaination that is difficult to understand.  The style is good and it doesn't move too slow either.  It is C++ from the ground up, not C converted to C++ (like Walter Savitch's book), so they teach new design techniques, tailored for the beginning C++ programmer, specific for the language with classic examples that you have probably seen in other programming languages.  If you get a chance, order it at your local bookstore, take a look at it, and if you are interested, then buy it.  This book presents a new approach to learning C++ and software engineeering and I think there is a reason that over 150 institutions use Cohoon and Davidson as their primary text.

I remember how frustrating it is finding a good book for beginners... most people out here will recommend Lippman or Stroustrop, but those books were very difficult for me to use as a beginner.  Deitel and Deitel is not bad and is frequently reccommended, but I don't like several portions of their approach.

Good luck with your learning.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

656 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