?
Solved

Formatting Characters to Uppercase - ios::?

Posted on 1998-07-07
8
Medium Priority
?
271 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
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!

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
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 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.
Suggested Courses

771 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