You need to use wxFile::write as the second parameter to your wxFile constructor call, since the file is opened in read mode by default.
e.g.
wxFile *file_to_write_to = new wxFile(WxEdit1->GetLineText(0).c_str(), wxFile::write);
Your error message probably changed, by the way, because you didn't explicitly identify your c_str as a const char *. It looks like it's being interpreted as an integer, so you're actually calling the secondary constructor, which requires an integer value that identifies the file descriptor.
Check out the wxFile class in the widget docs for more details. You can download the docs from the wxWidget web site in a number of formats to have handy.