I'm trying to write some data to a file in Mosync. This is what I'm doing:
String filename = "c:\\hamburger.txt";
MAHandle newfile = maFileOpen (&filename, MA_ACCESS_READ_WRITE);
maFileCreate (newfile);
maFileWrite (newfile, &keyCode, 1);
The error occurs at line 2,
MAHandle newfile = maFileOpen (&filename, MA_ACCESS_READ_WRITE);
when trying to open the address at &filename. It says it can't convert a MAUtil::String to a const char*.
You can convert a
MAUtil::Stringinto aconst char*with.c_str().Thus, instead of
&filename, I usedfilename.c_str()and it compiled. The entire code still does not work, however.