Advertisement

Passing arrays

Started by February 12, 2000 04:56 PM
1 comment, last by ECKILLER 24 years, 10 months ago
hi, SomeFunct(char); then i pass an array of char but i''m getting can''t convert char to char[256] if i do SomeFunct(char[]); then my compiler doesnt even recognize it as a function. I''m sure this is easy and dumb but i cant think of it now. Thanks. I''m using VC++6.0 ECKILLER
ECKILLER
void SomeFunction(char Arg[]);

Should work in VC++ 6. To call this function with an array do it like this:

char Array[25];

SomeFunction(Array);

And that''s it.
Advertisement
replace SomeFunct(char lpWhatever);
with SomeFunct(char* lpWhatever);

As always.. this question could have been avoided by reading the VC++6.0 (online) manual. Look for the chapter on arrays and pointers (and stuff).

This topic is closed to new replies.

Advertisement