I changed up my encryption formula so that it would take char instead |
Why? Strings are easier to to work with.
If you could help me get the characters from inside the QString content to turn into "char" I would appreciate I can only figure out how to convert to "char*" been trying for like 3 hours now getting annoying. |
A "char" is a single character. You cannot fit an entire string into a single character.
A "char*" can point to a series of characters, hence why there are conversions to char* but not to char.
If you don't understand the difference (or even if you do), save yourself a headache and just use strings.
btw whats the difference between (or different purposes of) Ascii, Latin1, and Utf8? |
They're different character encodings. ASCII is the base character set (codes 0-127) which has the Latin/English alphabet, numerals, and common punctuation. But if you want foreign characters like japenese glyphs, Greek letters, etc, etc, you have to go beyond that set. So there are other encodings each which cover different areas.
Utf8 is the "Unicode" format, which is all-inclusive (that is, all existing glyphs can be represented in a UTF8 string).
for(i=0;i<sizeof(contents)/sizeof(contents[0]);++i){ |
This will not work. You should never use sizeof() to get the lenght of a string. It's even a poor choice to get the size of an array.
Again. Do yourself a favor and just use strings. When dealing with string data, it only makes sense to use strings.