Enviado em 14/11/2021 - 14:28h
Boa dia a todos,#include <stdio.h> #include <stddef.h> int main() { char Char = 'a'; wchar_t wChar = L'á'; // wchar vou usar caracter acentuado! ///////////////////////////////////////// // NÃO QUERO COMPARAR ASSIM! ///////////////////////////////////////// if(Char == 'a') puts("Test1"); if(wChar == L'á') puts("Test2"); ///////////////////////////////////////// // Alguma forma desses abaixo funcionar? ///////////////////////////////////////// if(Char == "a") // error: comparison between pointer and integer puts("Test3"); if(Char[0] == "a") //error: subscripted value is neither array nor pointer nor vector puts("Test4"); if(wChar == "á") // error: comparison between pointer and integer puts("Test5"); if(wChar == L"á") // error: comparison between pointer and integer puts("Test6"); }
Enviado em 15/11/2021 - 20:26h
if(Char == "a") // error: comparison between pointer and integer puts("Test3"); if(Char[0] == "a") //error: subscripted value is neither array nor pointer nor vector puts("Test4"); if(wChar == "á") // error: comparison between pointer and integer puts("Test5"); if(wChar == L"á") // error: comparison between pointer and integer puts("Test6");
if(Char[0] == "a") //error: subscripted value is neither array nor pointer nor vector puts("Test4");
Enviado em 15/11/2021 - 21:58h
if(Char[0] == "a") //error: subscripted value is neither array nor pointer nor vector puts("Test4");
Criar entrada (menuentry) ISO no Grub
Como gerar qualquer emoji ou símbolo unicode a partir do seu teclado
Instalando o Pi-Hole versão v5.18.4 depois do lançamento da versão v6.0
Instalar o VIM 9.1 no Debian 12
Como saber o range de um IP público?
Muitas dificuldades ao instalar distro Linux em Notebook Sony Vaio PCG-6131L (VPCEA24FM)
Dock do debian está muito pequena (1)
Instalei Windows 11 e não alterou o Grub do Debian (0)
Linux Mint (21.2) não reconhece teclado mecanico RASEC da PCYES (2)