Char en const char*
Résolu/Fermé
sangoku12
Messages postés
31
Date d'inscription
mercredi 10 août 2011
Statut
Membre
Dernière intervention
9 mai 2013
-
16 sept. 2011 à 23:26
KX Messages postés 16734 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 24 avril 2024 - 19 sept. 2011 à 13:43
KX Messages postés 16734 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 24 avril 2024 - 19 sept. 2011 à 13:43
A voir également:
- Char en const char*
- Char ai - Guide
- Convertir string en char ✓ - Forum C++
- Char code ascii - Guide
- Convertir char en int java - Forum Programmation
- Cannot convert 'string' to 'const char*' ✓ - Forum Programmation
1 réponse
KX
Messages postés
16734
Date d'inscription
samedi 31 mai 2008
Statut
Modérateur
Dernière intervention
24 avril 2024
3 015
16 sept. 2011 à 23:33
16 sept. 2011 à 23:33
Je ne sais pas si c'est la meilleure méthode mais tu peux faire comme ça :
char c = '5'; char ch[2]={c,'\0'};
17 sept. 2011 à 00:01
19 sept. 2011 à 13:26
Modifié par KX le 19/09/2011 à 13:55
Ou directement en manipulant les données :