On the programming of C + + in Linux

Source: Internet
Author: User

Read the VI command for several days, hehe, no sense of achievement. A mess, there are some instructions for gcc,gdb,make. But no practice, today's practice, haha, very comfortable.

VI is not used, the level of the bottom also did not feel anything, hehe

But Gedit is very good, can identify a lot of languages oh, c,java,c# and so on.

hello.c

#include <stdio.h>

int main ()

{

printf ("Hello world!");

return 0;

}

Compiling with GCC:

Gcc-o Hello hello.c

./hello

is the output

Hello world!

Successful, although studied the programming under the Linux, but this time is autonomous, haha.

At the same time, a problem was found.

As in the following procedure

TEST.c

#include <stdio.h>

int main ()

{

for (;;)

{

}

return 0;

}

This program will be a big problem once it is compiled.

At first I did not notice, ordered a lot of under, hehe, then there is no problem.

There's a big problem slowly.

My CPU, or my double core, ran to 100%.

Sweat.......

I look at the manager: I did not think of the amount, is the test run occupied with so many things hungry ...

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.