I'm trying to pass some data between methods.
In one method, I call the other method, passing in an address to store the file status.
grpc::StatusCode ClientNode::Store(const std::string &filename) {
....
FileStatus file_server_status;
StatusCode statStatusCode = this->Stat(filename, &file_server_status);
....
}
In the method that gets called, the paramter is a void*, so it doesn't work because the conversion from void* to FileStatus* is invalid.
grpc::StatusCode ClientNode::Stat(const std::string &filename, void* file_status) {
....
Status status = service_stub->GetFileStatus(&context, request, file_status);
....
}
test.cpp:318:79: error: invalid conversion from ‘void*’ to ‘dfs_service::FileStatus*’ [-fpermissive]
Status status = service_stub->GetFileStatus(&context, request, file_status);
How do I make this work? In C I would just do a cast, but this doesn't seem to be allowed in C++.