idl float to string conversion
up vote
0
down vote
favorite
Hello I am trying to convert float to string in IDL/cpp. I am assuming that is what I need to do as that is what the error indicated when I tried to compile. What I am trying to do is grab the "value" of minDamage and maxDamage.
@dirty
public native float getMaxDamage(boolean withPup = true);
public void setMaxDamage(float value) {
maxDamage = value;
}
@dirty
public native float getMinDamage(boolean withPup = true);
public void setMinDamage(float value) {
minDamage = value;
}
But when I try to do so I get the error
error: could not convert from ‘float’ to ‘sys::lang::String’
return maxDamage;
^~~~~~~~~
Thanks for any help, if there is any more information needed just let me know.
c++ idl
add a comment |
up vote
0
down vote
favorite
Hello I am trying to convert float to string in IDL/cpp. I am assuming that is what I need to do as that is what the error indicated when I tried to compile. What I am trying to do is grab the "value" of minDamage and maxDamage.
@dirty
public native float getMaxDamage(boolean withPup = true);
public void setMaxDamage(float value) {
maxDamage = value;
}
@dirty
public native float getMinDamage(boolean withPup = true);
public void setMinDamage(float value) {
minDamage = value;
}
But when I try to do so I get the error
error: could not convert from ‘float’ to ‘sys::lang::String’
return maxDamage;
^~~~~~~~~
Thanks for any help, if there is any more information needed just let me know.
c++ idl
Not familiar withsys::lang::String
- if it has appropriate constructors, you could convert float tostd::string
using the standard ways and then pass it directly or thec_str()
to.
– Aconcagua
Nov 15 at 2:37
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Hello I am trying to convert float to string in IDL/cpp. I am assuming that is what I need to do as that is what the error indicated when I tried to compile. What I am trying to do is grab the "value" of minDamage and maxDamage.
@dirty
public native float getMaxDamage(boolean withPup = true);
public void setMaxDamage(float value) {
maxDamage = value;
}
@dirty
public native float getMinDamage(boolean withPup = true);
public void setMinDamage(float value) {
minDamage = value;
}
But when I try to do so I get the error
error: could not convert from ‘float’ to ‘sys::lang::String’
return maxDamage;
^~~~~~~~~
Thanks for any help, if there is any more information needed just let me know.
c++ idl
Hello I am trying to convert float to string in IDL/cpp. I am assuming that is what I need to do as that is what the error indicated when I tried to compile. What I am trying to do is grab the "value" of minDamage and maxDamage.
@dirty
public native float getMaxDamage(boolean withPup = true);
public void setMaxDamage(float value) {
maxDamage = value;
}
@dirty
public native float getMinDamage(boolean withPup = true);
public void setMinDamage(float value) {
minDamage = value;
}
But when I try to do so I get the error
error: could not convert from ‘float’ to ‘sys::lang::String’
return maxDamage;
^~~~~~~~~
Thanks for any help, if there is any more information needed just let me know.
c++ idl
c++ idl
edited Nov 15 at 1:53
Some programmer dude
293k24243403
293k24243403
asked Nov 15 at 1:50
David Brawley
1
1
Not familiar withsys::lang::String
- if it has appropriate constructors, you could convert float tostd::string
using the standard ways and then pass it directly or thec_str()
to.
– Aconcagua
Nov 15 at 2:37
add a comment |
Not familiar withsys::lang::String
- if it has appropriate constructors, you could convert float tostd::string
using the standard ways and then pass it directly or thec_str()
to.
– Aconcagua
Nov 15 at 2:37
Not familiar with
sys::lang::String
- if it has appropriate constructors, you could convert float to std::string
using the standard ways and then pass it directly or the c_str()
to.– Aconcagua
Nov 15 at 2:37
Not familiar with
sys::lang::String
- if it has appropriate constructors, you could convert float to std::string
using the standard ways and then pass it directly or the c_str()
to.– Aconcagua
Nov 15 at 2:37
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311316%2fidl-float-to-string-conversion%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Not familiar with
sys::lang::String
- if it has appropriate constructors, you could convert float tostd::string
using the standard ways and then pass it directly or thec_str()
to.– Aconcagua
Nov 15 at 2:37