Getting a return value from function that has no parameters
I have the following function:
1 2 3 4 5 6
|
content::mojom::CreateViewParamsPtr content::mojom::CreateViewParams::New() {
CreateViewParamsPtr rv;
mojo::internal::StructHelper<CreateViewParams>::Initialize(&rv);
return rv;
}
|
I want to get the value of rv into my main function. I call it like this:
1 2 3 4 5 6 7 8
|
int PatrickMainChrome(int argc, const char** argv) {
content::mojom::CreateViewParams::New();
return 0;
}
|
how would i get the value of rv that the ::New() function returns to use in my main function?
Last edited on
1 2 3 4 5
|
content::mojom::CreateViewParamsPtr rv = content::mojom::CreateViewParams::New();
// or
auto rv = content::mojom::CreateViewParams::New();
|
Last edited on
Topic archived. No new replies allowed.