English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

the message i get is 'const char*' to 'char' im trying to use a string array, im not sure what this means. im only a beginer so try and keep ur answers simple

2006-12-12 21:20:08 · 4 answers · asked by DAN 1 in Computers & Internet Programming & Design

4 answers

I think you have syntax error
check your declaration....
if you are using strings,then you cannot declar it with character (char). you should declar it as a string .


also check if have written #include on the top of the program..
for example:

#include //this is for printf ans scanf -as you should know-

#include // this one is for the string cause you are using it.

the when you declare..use for example
string alpabet ; ((or any name that you declare))

good luck!!

2006-12-12 23:27:20 · answer #1 · answered by Anonymous · 0 1

If you do not know the difference between a char* and char then you seriously need to learn more C before you attempt to play with strings.

Exactly what error are you getting? It all depends on what you declared and how you are modifying it. Remember that a string array is really an array of char *. You have to dereference those pointers before assigning values.

2006-12-12 22:34:30 · answer #2 · answered by stinkypanda 1 · 0 0

it would help to see the code where the error is occouring, but, it sounds like you are trying to pass a char pointer when only a char is required OR you are trying to pass a char when a char pointer is required.

2006-12-13 01:07:17 · answer #3 · answered by justme 7 · 0 0

What you need is a tutorial for C programming.

http://vergil.chemistry.gatech.edu/resources/programming/c-tutorial/toc.html

2006-12-12 21:41:49 · answer #4 · answered by «Dave» 4 · 0 1

fedest.com, questions and answers