Problem with function returning uuid_t
Can someone help me with this?
1 2 3 4 5 6 7 8
|
#include <uuid/uuid.h>
uuid_t getUuid() {
uuid_t uuid;
uuid_generate(uuid);
return uuid;
}
|
../main.cpp:10:16: error: ‘getUuid’ declared as function returning an array
uuid_t getUuid() {
^
|
Thanks in advance, Stefan
Last edited on
You cannot return an array. Provide the data like
uuid_generate(...)
.
1 2 3
|
void getUuid(uuid_t &uuid) {
uuid_generate(uuid);
}
|
Thank you for the answer. I have got a segmentation fault, but I have found another solution.
Stefan
Topic archived. No new replies allowed.