a datatype that can hold a character of the implementation’s character set.
Questions tagged [chars]
208 questions
0
votes
3 answers
C++ Constant char
I built a simple calculator out of c++, it uses chars, so (+,-*,/) will works as math operators but when a user inputs an '=' it does't work.
#include
#include
#include
#include
using namespace std;
#define…

user2371751
- 1
- 1
0
votes
1 answer
Replacing chars in a string with a number
I am writing a code that will decode a 10 digit phone number that contains letters into all numbers.
i.e 1-800-iloveny would get converted into 1-800-4568369.
So far I've only encountered one problem, but have two questions.
Do my if() statements…

Ryan Sisson
- 139
- 2
- 4
- 12
0
votes
1 answer
Weird issue with android drawing. Some chars mistically disappear
I use Nexus 7 device
I create Paint with font size and type face;
My font is "Arial", size is 780;
My task is to write "sit" with different colours (s - in red, it - in blue)
for(int j = 0; j < subStr.get_items().size(); j++) // substr contains two…

user2358864
- 13
- 2
0
votes
7 answers
How to select all characters to the right of a specific character in a string - PHP
I spent a long time trying to figure this out! How do I select all the characters to the right of a specific character in a string when I don't know how many characters there will be?

carter
- 5,074
- 4
- 31
- 40
0
votes
3 answers
random chars for word game python
def dealHand(n):
"""
Returns a random hand containing n lowercase letters.
At least n/3 the letters in the hand should be VOWELS.
Hands are represented as dictionaries. The keys are
letters and the values are the number of times…

Padraic Cunningham
- 176,452
- 29
- 245
- 321
0
votes
1 answer
Java - char's in strings
I have made a file called AESencrypt which encrypts characters. I am trying to make this work by getting the input of the passwordField and encrypting it.
This is what I have tried, though it failed:
…

user1922826
- 9
- 2
0
votes
2 answers
passing only first element of the array of chars to a function c++
Basically I have an array of words
void print(char *str) {
cout << str <

inside
- 3,047
- 10
- 49
- 75
0
votes
2 answers
Strange chars at the end of a line in linux. Reading line with getline
At the begining, I'd like to say that I'm very beginer with linux and stuff.
I'm reading a file (line by line) with use of a GetLine.
At the start, I open file descriptor with function open.
Then I change (int)f_descriptor to (FILE*)f_stream…

Patryk
- 3,042
- 11
- 41
- 83
0
votes
3 answers
java: hangman game repeating letters
I´ve got a logic problem with a hangman project, it takes an letter from the user and searches if that letter is contained within the secret word. The problem is the way I´ve programmed it, if there are several occurrences of the letter the user…

Tom Lilletveit
- 1,872
- 3
- 31
- 57
0
votes
1 answer
Codeigniter like chars with diacritic?
Is possible to "learn" codeigniget to recognize chars like ľščťžýáíé or ĽŠČŤŽÝÁÍÉ ? Cause I want not to have search sensitive to those chars. For example if I have in my table row "Šilíoá" and I search for silioa nothing will be foung. But if I am…

Geril
- 159
- 1
- 15
0
votes
4 answers
Changing Certain Chars in A String
I'm a beginner programmer and I'm trying to make a very simple version of Hangman. I'm having so problem with my code. This is the portion of code I'm having a problem with:
for(int i = 0; i <= wordLength - 1; i++ ) {
if (letter…

Rohan Khajuria
- 636
- 2
- 12
- 26
0
votes
2 answers
creating vectors of character pointers to point to vector of strings
I have a vector of strings: vectorElements
I'd like to create a vector of *char to point to the beginning of each string. My objective is to be able to traverse through each string, character by character. Ultimately, I'd like to sort the vector of…

NicholasNickleby
- 29
- 1
- 7
0
votes
2 answers
Sum and subtract chars in Java and always get result within the ASCII range
I have created two functions that sum and subtract the numeric values of two chars and return the char of the result in PHP. It's something like this:
function sumchars($c1, $c2) {
return chr(ord($c1) + ord($c2));
}
function subchars($c1, $c2)…

ali
- 10,927
- 20
- 89
- 138
-1
votes
1 answer
Decoding Ä Ü Ö in PHP and MySQL
I have problems decoding several Chars.
In the Database, the Chars Ä, Ö and Ü are saved like "ö" or "�"
Any Idea how i can decode those Chars back to ÄÖÜ?

Styler2go
- 604
- 2
- 12
- 32
-1
votes
3 answers
Chars scrambling (C# and Javascript)
I need to scramble chars in word. And this scrambling must not be random. In other words, each time of scrambling (on the same word) the new result must be equal to last scramble result (on the same word). Very simple example is XOR. But XOR is very…

Edward83
- 6,664
- 14
- 74
- 102