toupper() function in turbo (borland) c++ ?!?!

Started by
2 comments, last by jarod83 21 years ago
Hello... I have this sort of a problem... In visual c++ I used the toupper(int) function, so I had this code: int chr; chr = getch(); chr = toupper(chr); The problem is that Turbo C++ can''t find the toupper() function, that should have ben defined in conio. Is there another way of doing this code in turbo c++ ???
Advertisement
It might be in the ctype header file
you could always write your own...


      char toupper(char t){ if (t>='a' && t<='z')   t-=('a'-'A'); //Subtract the difference between lower case and upper case a return t;}      


--- Edit ---
Just wanted to say, that I used to use toupper in Borlan's Turbo C/C++, and I beleive it's in the strings.h include file, but don't hold me to that.

[edited by - Ready4Dis on April 2, 2003 10:09:03 AM]
It should be (i.e. standard):


#include <cctype>

int chr = getch();
chr = toupper(chr);


[ Google || Start Here || ACCU || MSDN || STL || GameCoding || BarrysWorld || E-Mail Me ]
[ Google || Start Here || ACCU || STL || Boost || MSDN || GotW || CUJ || MSVC++ Library Fixes || BarrysWorld || [email=lektrix@barrysworld.com]E-Mail Me[/email] ]

This topic is closed to new replies.

Advertisement