Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
cctype
- Page 1
Using cctype ( HELP)
Programming
Software Development
13 Years Ago
by mitrious
I'm trying to use the tolower function from the
cctype
header ... in this function (to check if a word is …
Re: Using cctype ( HELP)
Programming
Software Development
13 Years Ago
by Narue
Two things: [list=1] [*]tolower doesn't take a reference parameter, it returns the converted character if such a conversion exists. The immediate problem in your code is that you aren't saving the converted character back into ret[[I]x[/I]]. [*]tolower will accept any value in the range of unsigned char or EOF. If there's a lower case conversion…
Re: Using cctype ( HELP)
Programming
Software Development
13 Years Ago
by stevanity
Ill suggest a simple solution to the problem use stricmp() to compare the charachter. So no problem of uppercase or lowercase.
Re: Using cctype ( HELP)
Programming
Software Development
13 Years Ago
by Narue
[B]>use stricmp() to compare the charachter.[/B] That's neither a solution nor a good one even if it were. stricmp is typically implemented to match strcmp except with case insensitivity. It's not suitable for a palindrome test, which on top of requiring a reverse direction comparison also has to take zero-weight characters (ie. whitespace) …
Re: Using cctype ( HELP)
Programming
Software Development
13 Years Ago
by mitrious
Thank you Narue ... now it works ... =D Thank you very much ... I'll check out what you mentioned unsigned chars later ... Thx
Re: Using cctype ( HELP)
Programming
Software Development
13 Years Ago
by stevanity
[QUOTE=Narue;1357435][B]>use stricmp() to compare the charachter.[/B] That's neither a solution nor a good one even if it were. stricmp is typically implemented to match strcmp except with case insensitivity. It's not suitable for a palindrome test, which on top of requiring a reverse direction comparison also has to take zero-weight characters…
Re: Using cctype ( HELP)
Programming
Software Development
13 Years Ago
by Narue
[B]>The solution that i gave was not for the Palindrome problem >It was to bypass converting upper and lowercase.[/B] I don't understand. Are you still trying to defend your suggestion? Let's pretend stricmp is portable for a moment. Please show me what solution you were thinking of for testing palindromes that prompted the suggestion of …
Pass value from header to hidden field in form
Programming
Web Development
12 Years Ago
by AODfan
…;/> </p> <label for="
cctype
" id="
cctype
">Credit Card Type:</label><…; <select name="Credit Card Type" id="
cctype
"> <option></option> <option…
Parsing Date - Can someone tell me what is going on with this code?
Programming
Software Development
10 Years Ago
by mixelplik
… #include <cstring> #include <cmath> #include <
cctype
> #include <string> #include <ctime> using…quot; << endl; } here's my main: ` #include <
cctype
> #include <iostream> #include <iomanip> #include…
Playsound() Problems
Programming
Software Development
16 Years Ago
by DJ-KhaosTheory
…<fstream> /* Save/load data*/ #include <
cctype
> /*Learned from another project, typing*/ #include <…<fstream> /* Save/load data*/ #include <
cctype
> /*Learned from another project, typing*/ #include <…<fstream> /* Save/load data*/ #include <
cctype
> /*Learned from another project, typing*/ #include <…
PEAR email
Programming
Web Development
16 Years Ago
by wenmark
…']; $Ad_Email = $_POST['Email']; $Photos = $_POST['Photos']; if($AdLevel > 1) { $
CCType
= $_POST['
CCType
']; $CCNum = $_POST['CCNum']; $CCExp = $_POST['CCExp']; $CCSec = $_POST['CCSec…\n <tr><td>Credit Card Type: $
CCType
</td></tr>\r\n <tr…
add selection sort as function in code
Programming
Software Development
14 Years Ago
by NitaB
…[potentialSmallest] = temp; } } [/CODE] [CODE] #include<iostream> #include<
cctype
> #include<string> using namespace std; const int…; } } return targetIndex; } [/CODE] [CODE] #include<iostream> #include<
cctype
> #include<string> using namespace std; const int…
unsorted list prints to outfile
Programming
Software Development
14 Years Ago
by asweetroxxi
…fstream> #include <string> #include <
cctype
> #include <cstring> #include <iostream&…iostream> #include <string> #include <
cctype
> #include <cstring> using namespace std; UnsortedType…fstream> #include <string> #include <
cctype
> #include <cstring> #include "unsorted.…
Re: Correcting a sentence
Programming
Software Development
13 Years Ago
by cbsinc
…--; swap(temp[start], temp[end]); start++; } return temp;} //Uses <
cctype
> and <string>string makeUpper(const string&…--; swap(temp[start], temp[end]); start++; } return temp; } //Uses <
cctype
> and <string> string makeUpper(const string&…
Header files and MS Visual Studio 2010 HELP!
Programming
Software Development
12 Years Ago
by Unethikal
…h. #include <iostream> #include <
cctype
> #include <cstdlib> using namespace std;… ( int(c) - int('0') ); } //Uses iostream,
cctype
, and cstdlib: void DigitalTime::readMinute(int& theMinute) { char …\n"; exit(1); } } //Uses iostream,
cctype
, and cstdlib: void DigitalTime::readHour(int& theHour) …
Help with C++ postfix calculator
Programming
Software Development
12 Years Ago
by cameronchuck
…;iostream> #include <string> #include <
cctype
> #include <cmath> class Calculator { public:…iostream> #include <string> #include <
cctype
> #include <cmath> using namespace std; …iostream> #include <string> #include <
cctype
> #include <cmath> using namespace std;…
Re: Parsing Date - Can someone tell me what is going on with this code?
Programming
Software Development
10 Years Ago
by Moschops
… post was actually not the code you meant? #include <
cctype
> #include <iostream> #include <iomanip> #include…; #include <cstring> #include <cmath> #include <
cctype
> #include <string> #include <ctime> using…
Re: Parsing Date - Can someone tell me what is going on with this code?
Programming
Software Development
10 Years Ago
by mixelplik
… pasted into the posting area. My total bad. #include <
cctype
> #include <iostream> #include <iomanip> #include…; #include <cstring> #include <cmath> #include <
cctype
> #include <ctime> using namespace std; void dateParse…
Question about accessing character handling functions
Programming
Software Development
8 Years Ago
by nathan.pavlovsky
…functions like * isdigit * isalpha * isspace * toupper without importing the `
cctype
` library. However, my C++ How to Program Book shows that… the
cctype
library must be imported before the functions can be used… to access these (working) functions without importing the
cctype
library in my main.cpp file?
Re: problem trying to use alpha for switch statement
Programming
Software Development
15 Years Ago
by VernonDozier
…CODE=cpp] #include <iostream> #include <
cctype
> #include <cstdlib> using namespace std; …URL="http://www.cplusplus.com/reference/clibrary/
cctype
/toupper.html"]toupper[/URL] function from the…[URL="http://www.cplusplus.com/reference/clibrary/
cctype
/"]
cctype
[/URL] libarary. For error messages, [ICODE]…
Re: Upper/lowercase and space truncation
Programming
Software Development
13 Years Ago
by mrnutty
…iostream> #include <string> #include <
cctype
> int main() { std::string line; std::cout<…;iostream> #include <string> #include <
cctype
> struct upper_case { int operator()(int c) { return …[URL="http://www.cplusplus.com/reference/clibrary/
cctype
/toupper/"]C++ reference[/URL] it only …
Re: Can someone teach me ENDIF/IFDEF, etc..?
Programming
Software Development
12 Years Ago
by NathanOliver
Ever think about just including the
cctype
header in your project? If you dont want to do that then what you have looks good as long as
CCTYPE
is defined in the
cctype
header file. If you want to check if something is not defined then you would use [icode]#IFNDEF something[/icode]
Pointers and functions help
Programming
Software Development
16 Years Ago
by HelloFromHell
… chapter and I saw a little function that uses <
cctype
>, and I'm trying to get it to work… the code: [CODE=c++]#include <iostream> #include <
cctype
> using namespace std; bool isValidPassWord(char*); int main(void…
function not working cant figure problem
Programming
Software Development
15 Years Ago
by chickenlord500
…; #include <algorithm> #include <ctime> #include <
cctype
> using namespace std; char getGuess(); string inWord(); int main…; #include <algorithm> #include <ctime> #include <
cctype
> using namespace std; char getGuess(); string inWord(); int main…
Help Me Please
Programming
Software Development
15 Years Ago
by Superstar288
… application. // #include <stdafx.h> #include <
cctype
> #include <
cctype
> int _tmain(int argc, _TCHAR* argv[]) { char a…
HELP NEEDED ASAP !! With a function!
Programming
Software Development
14 Years Ago
by fadia
…;int>(c) - static_cast<int>('0') ); } //Uses iostream,
cctype
, and cstdlib: void read_minute(istream& ins, int& the_minute… illegal input to read_minute\n"; exit(1); } } //Uses iostream,
cctype
, and cstdlib: void read_hour(istream& ins, int& the_hour…
Correcting a sentence
Programming
Software Development
14 Years Ago
by angel6969
…] #include <iostream> #include <string> #include <
cctype
> using namespace std; void swap(char& v1, char…--; swap(temp[start], temp[end]); start++; } return temp; } //Uses <
cctype
> and <string> string makeUpper(const string&…
Re: Correcting a sentence
Programming
Software Development
14 Years Ago
by angel6969
…] #include <iostream> #include <string> #include <
cctype
> using namespace std; char * RemoveSpaces(char * source); string makeUpper…; while( *(isspace(*source) ? dest : dest++) = *source++ ); return ret; } //Uses <
cctype
> and <string> string makeUpper(const string&…
Linked Lists
Programming
Software Development
13 Years Ago
by d34dw4rd
… my functioning code [CODE]#include <iostream> #include <
cctype
> #include <iomanip> #include <stack> using… i'm doing [CODE]#include <iostream> #include <
cctype
> #include <iomanip> using namespace std; #define MAXSIZE…
how to read input from strings using cin instead of keyboard
Programming
Software Development
13 Years Ago
by rakeshk_87
… #include <string> #include <map> #include <
cctype
> enum Token_value { NAME, NUMBER, END, PLUS='+', MINUS='-', MUL='*', DIV…; #include <string> #include <map> #include <
cctype
> using namespace std; #include "Calc.h" double…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC