The VC helps to correct a mistake, knowing that the reason will not be changed.

Updated on healthy 2024-04-11
7 answers
  1. Anonymous users2024-02-07

    Your title is too stylish

    The name in your jiegou is a pointer, and there is no allocated space. The easiest way to do this is to change it to this.

    struct jiegou {

    char name[64];No one will have a name more than 64 characters, or 32 kanji.

    int id;

    int fenshu[3];

    Or with string:

    include remember to include this.

    struct jiegou {

    string name;No one will have a name more than 64 characters, or 32 kanji.

    int id;

    int fenshu[3];

    As a friendly reminder, you can also use the malloc() function to give x[i].name allocates space, and it is released when it is finished, which is not recommended at all.

    Also, if you don't use using namespace std; and so on, I have a hard time believing you can compile through.

  2. Anonymous users2024-02-06

    It's that you misunderstood when you read the book, and you understood our character pointers as strings.

    char *p="hello world";That's right. Assign a value at initialization.

    char *p;Error, which is a lost pointer pointing to an indeterminate location in memory.

    p="hello world";Applying a value to the memory unit that the pointer points to here will cause the system to crash.

    The corrected ** is as follows:

    #include

    int i,j,k;

    struct jiegou

    char name[100];

    int id;

    int fenshu[3];

    void main()

    jiegou x[10];

    for(i=0;i<10;i++)

    cout<<"Input"<>x[i].name>>x[i].id>>x[i].fenshu[0]>>x[i].fenshu[1]>>x[i].fenshu[2];

    cout<<"All lists:"cout

  3. Anonymous users2024-02-05

    Don't pointer, change to:

    char name[64]

    That's it, why do you want the whole pointer?

  4. Anonymous users2024-02-04

    first-chance

    exception

    0xe06d7363:microsoft

    c++exception

    When debugging a program in a VC, the output window sometimes appears "first-chance

    exception

    Such information. Generally speaking, this is due to an exception in the program, which is captured by the VC. Sometimes there is no error when the program is running, but it always stops here during debugging and the following program cannot be debugged. first-chance

    exception

    0xe06d7363:

    microsoft

    c++exception”。windows

    Structural exceptions (SEH) are widely used in operating systems to handle special cases, and many low-level APIs rely on SEH to handle possible surprises. In addition, these APIs have a ** that captures SEH, and the resulting exception will not affect the program. But due to the "first-chance" mentioned above

    exception,second-chance

    exception", VC will still have an output, but we can ignore it entirely. If you really don't like the output, then you have to disable the "first-chance" for a particular exception

    exception'.

  5. Anonymous users2024-02-03

    It's not that the VC is not installed, you are sure that your project creation is correct, and the main function is not the entry of the Win32 program

  6. Anonymous users2024-02-02

    1 The driver is unstable and incompatible with the system, which is most likely to cause the memory to be unable to read or the memory to be "written" file protection.

    2. One or more rogue software is installed on the system, which has a greater chance of IE or system crash, and file protection may also occur.

    3. There is a conflict between the programs loaded by the system or the programs that are running on the system, especially some antivirus software monitoring programs.

    4. There are vulnerabilities in the system itself, which makes it vulnerable to network attacks.

    5. Virus problems are also the main causes of memory can not be read, file protection, error ......

    6. If the memory cannot be read when playing the game, it is likely that the graphics card driver is not suitable, or the version is not new enough or does not meet the game or graphics card driver.

    7. The problem that some software itself is insufficient.

    8;The poor compatibility between the computer memory and the motherboard is also the fatal reason why the memory cannot be read!

    If the above problems cannot be solved, it is unlikely that the problem will be repaired directly (it is recommended to use a new system disk). **。

  7. Anonymous users2024-02-01

    There is a syntax error:

    c=5/9(f-32);

    The multiplication sign is omitted from the sentence.

    There is also a logical error: 5 and 9 are both integers, so the return value of 5 9 is also an integer, i.e. 0. So, no matter what value you enter, the temperature value returned is 0.

    There are also a few **miswritten:

    1.When reading data, the number of bits of the data is not controlled by **, but by the input data itself. So, scanf("Fahrenheit = %2f",&f);

    Medium %2f should be replaced by %f.

    2.In the first parameter of scanf(), the characters of the non-format control character should be as few as possible, otherwise many more characters need to be entered when entering data, which will make the program inconvenient. For example, scanf("Fahrenheit = %F", &f);

    This sentence needs to be entered when entering the data.

    Fahrenheit = this text, f can be assigned to .

    3.Before the scanf() statement, it's a good idea to have an output statement that hints the user of what they should do.

    4.Also, in C99 and later C standards, it is recommended to write the main function return value as an integer. It returns 0 to indicate that the program is running normally, otherwise it indicates that there is an exception when the program is running.

    After the change, the procedure is as follows:

    #include

    #include

    int main()

Related questions
8 answers2024-04-11

grace (meaning elegant, graceful).

13 answers2024-04-11

Is it male or female? The woman's name is Wei Tianxue, and the man's name is Wei Tianwei.

20 answers2024-04-11

The real deal. Resume one's former profession.

Intensify. Intrigue. >>>More

9 answers2024-04-11

Hello, according to your ** view of your banknotes can not be called the wrong coin, generally speaking, the wrong version of the coin is very serious displacement or the wrong pattern on it is serious, your slight flaw can not be called the wrong coin. >>>More

30 answers2024-04-11

Maybe the way you love her is not quite right, you should make it clear to her instead of beating her and scolding her, girls are to be spoiled, you can try to talk to her, apologize to her, and be sincere If you reconcile, I suggest that you love her in a different way, stop beating her and scolding her.