Solve the Problem of unidentifiable & in Ubuntu

Source: Internet
Author: User
At that time, the idea was that even the addressing operator & amp; could not be used, and how much C could be used in linux. Then self-corruption. Today, I am still worried. C. However, I am reminded that I must solve the problem. That's why I stick my head to it. A little frustrated. Then I think I should solve it. No search found. I later understood why I couldn't find it. The problem is not found. Then I went to the Forum for help, and csdn for help. I always offered a reward for almost all my points. I really wanted to solve the problem. Then I thought that I couldn't even use the address fetch operator, and how much C can use in linux. Then self-corruption.

Today, I am still worried. C. However, I am reminded that I must solve the problem. That's why I stick my head to it. A little frustrated. Then I think I should solve it. No search found. I later understood why I couldn't find it. The problem is not found. Then I went to the Forum for help, and csdn for help. I always offered a reward for almost all my points. I really wanted to solve the problem. Then I waited anxiously.

Then I thought, let's do something first. So I first saved the program and wrote a description file to record the problem. This is a qualitative leap for me. Because I have not been blocked by difficulties, I will not be depressed. Think about the past, I must have been depressed and left alone. I will remember this experience: If you encounter difficulties, search first, and then seek help online. Online help is also a good way to urge you to care about your problems and your reputation. It takes a long time to fix the problem. Then it will be solved at some point in the future. Or you have met the same type but succeeded, and then you will come back to check the problem and you will solve it on your own. Or the accurate help of enthusiastic people.

I solve this problem by using the former. After the problem is fixed, I continue to learn. Continue coding and practice C Programming in Ubuntu. Then I met another requirement (scanf ). To be honest, I was a little scared at that time, for fear of the address-taking operator & broke my program again. Then, somehow, I still compiled it and did not report any error, but it turned out to be a success!

So I began to reflect. It seems that the access operator is recognizable. Then, my program is definitely not wrong with the address fetch operator. I started to look back at the program again:

# Include "stdio. h"
Main (){
Int x = 0; y = 0;
Scanf ("% d", & x );
If (x <0) y = X-1;
Else {
If (x> 0) y = x + 1;
Else y = 0;
}
Printf ("x = % d \ n y = % d \ n", x, y );
}

I found that int x = 0; y = 0; it should be "," Because of carelessness.

It was a syntax error, but the compiler will say that Y has not been declared, because from the perspective of the compiler, y has not been declared. At first glance, y has been assigned a value, assign values without declaration. In my thoughts, I assigned a value. In this way, I will be confused and depressed. In fact, I did make a mistake.

The compiler is strict. It is true that you are wrong if you are not on duty. Don't be afraid to block the road in the future. Put it together and you will be able to solve it after a short meeting.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.