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
#2

Sorry, ended up fixing it myself (20 views no help o.o).
Reply
#3

EDIT: sry, didn't refresh the page
Reply
#4

21.

Post the fix.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)