C + + Learning Note--season 2

Source: Internet
Author: User

A simple Ege program:

#include"Graphics.h"     //header file for Ege libraryintMainintargcChar**argv) {Initgraph ( the, -);//initializing the drawing windowOuttextxy ( -, -,"Aloha world!"); Line (Ten,Ten, -, $); Circle ( -, +, -);   Ege::getch (); //Add Ege:: namespace because there are getch functions in the Conio.h file. Avoid conflicts being overwritten. Closegraph ();//drawing ends close the drawing window.         return 0;//The CPP program returns an integer without a final return. But for readability, I want to add. }

Let's look at the contents of the "Graphics.h" header file. (catalog: C:\Program files\dev-cpp\mingw64\x86_64-w64-mingw32\include--Graphics.h)

#ifndef _graphics_h_ #define _graphics_h_
/ * declares that a C + + compiler is required to use the Ege graphics library */#ifndef __cplusplus#error you must using C + + compiler, or you need FileName with '. cpp ' suffix#endif'ege.h'using namespace Ege; #endif

C + + Learning Note--season 2

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.