Multi Dimensional arrays
#1

Hey,

I was planning to make a small system with arrays, my main objective is to make array with 2 things inside it, 1 with question, another one with answer, i've tried:

PHP код:
new CleverBot[MAX_MESSAGES][2] =
{
{
"question""answer"},
{
"question""answer"}
}; 
With this way it gives me:
Quote:

error 018: initialization data exceeds declared size

I've tried changing the "2" to a bigger number and it was working fine... but i want it to be 2 things only...
When i've tried to make it via enumator:

PHP код:
enum Data
{
    
Question[228],
    
Answer[228]
};
new 
CleverBot[MAX_MESSAGES][2] =
{
{
"question""answer"},
{
"question""answer"}
}; 
It gives me tag mism warning when i want to strfind (if(strfind(CleverBot[i][0], text, true) != -1)).



What am i messing up?
Reply


Messages In This Thread
Multi Dimensional arrays - by iLearner - 30.01.2017, 20:37
Re: Multi Dimensional arrays - by iLearner - 30.01.2017, 20:46
Re: Multi Dimensional arrays - by Eoussama - 30.01.2017, 20:48
Re: Multi Dimensional arrays - by ISmokezU - 30.01.2017, 21:24

Forum Jump:


Users browsing this thread: 2 Guest(s)