I'm having a college work on Threads
and competition control (OpenMP) in C, which is giving me a bit of a headache.
The work consists of taking text from any file and separating it from% cos_de% producers and consumers, where consumers will count the occurrence of a word in a row and count in a variable shared between threads. / p>
The problem is not even in the main focus being Threads
and the control itself, but in the pre-processing of the text, I have to extract accents and special characters.
I've tried it anyway but I could not map the two char positions (wchar that are defined, if I'm not mistaken) that hold this type of character. Has anyone done any type conversion?
Direct comparison does not work, nor does it use "strcmp". Can you help me? Remembering that it is in C and not C ++.
In short, given a string in C, you need to remove accents and special characters as an example:
char texto[] = "téxtô açentûádo";
//processo de remoção de acentos e caracteres especiais.
puts(texto); //retorna "texto acentuado" ao invés de "téxtô açentûádo"