B
Ben
Hi all,
I would like to know if there is an easy way to assign a string to an int.
I have a struct such as:
struct Values {
int a;
int b;
}
I have 2 strings that i read from a file:
string x = "12";
string y = "10";
Now I'd like to do something like this:
Values val;
val.a = x;
val.b = y;
There is of course a mis-match.. How do I fix it? Is there an easy way?
Thanx for help!
Ben
I would like to know if there is an easy way to assign a string to an int.
I have a struct such as:
struct Values {
int a;
int b;
}
I have 2 strings that i read from a file:
string x = "12";
string y = "10";
Now I'd like to do something like this:
Values val;
val.a = x;
val.b = y;
There is of course a mis-match.. How do I fix it? Is there an easy way?
Thanx for help!
Ben