Problems with string conversions in C?

Updated on technology 2024-02-09
7 answers
  1. Anonymous users2024-02-05

    Do it by your train of thought.

    Method 1. string strnumber="200m";

    strnumber = "m","");

    double dtnumber = ;

    Method two. string strnewstr = , 1);

    dtnumber = ;

  2. Anonymous users2024-02-04

    The first character of textbox1 is converted to an array of characters, and then converted to a unicode byte array, and the second byte is taken to execute the statement in parentheses if it is 0.

    The parenthetical statement converts the contents of textbox1 into a unicode byte array, and then converts it into a string and assigns a value to textbox2

    c text box is in unicode format by default.

    Is that okay?

  3. Anonymous users2024-02-03

    Since it's a C string, let's use replace.

    s = '200m';

    m', '');

  4. Anonymous users2024-02-02

    Is m OK, M can be changed if M is sure, I don't know if M is not sure.

  5. Anonymous users2024-02-01

    Put a textbox on the interface, id is a and make the following logical judgment based on the value you enter in the text box.

    string newdata;Declare one to hold the converted value.

    string type;//

    type=, 1).tostring();Truncate the first sign bit.

    if(type=="

    newdata=, 1).tostring())

    Remove + post-convert.

    elsenewdata=type+, 1).tostring())

    Add the up- sign after conversion.

  6. Anonymous users2024-01-31

    This question is teaching you how to use Implicit.

    Here it is specified that the int type can be implicitly converted to limitedint.

    in the main method.

    limitedtnt li =500;That's where this comes in. 500 is int, but it can be converted to li, and if there is no above, it will produce a compilation error.

    It's really just the C syntax, and in fact, when executing this sentence, he calls the method above.

    As for why 100 and not 500, it's because.

    The maxvalue is defined here, which limits the maximum value.

  7. Anonymous users2024-01-30

    limitedtnt li = 500

    This sentence determines that the actual value is 100

    Since thevalue in limitedtnt is a private variable, it is actually read and written through the attribute thevakue, and the set of this property is called when defined, and 100 is automatically assigned because the maximum value is exceeded

    return is actually a call to thevakue's get

Related questions
11 answers2024-02-09

First of all, it is necessary to understand what a binary tree is (and I guess the subject also understands). >>>More

4 answers2024-02-09

Just take a look at this one**.

Hope it helps. >>>More

5 answers2024-02-09

Most of the decimal places in VB are attributes, such as: >>>More

18 answers2024-02-09

Those who play on the left side switch to the right, and those who play on the right side change to the left. >>>More

12 answers2024-02-09

option explicit statement.

Used at the module level to force all variables in the module to be explicitly declared. >>>More