code::blocks基本使用 -...

Download Code::Blocks基本使用 - wirelesslab.sjtu.edu.cnwirelesslab.sjtu.edu.cn/~jlu/teaching/cp2015/uploads/code_blocks... · –编译 、运行程序 – ... 功能等一体化的开发软件服务套。如微软的Visual

If you can't read please download the document

Upload: duongnguyet

Post on 06-Feb-2018

271 views

Category:

Documents


2 download

TRANSCRIPT

  • Code::BlocksC

    SEIEE 3-121

    Email: [email protected]

    2015/9/16 1

    mailto:[email protected]

  • Code::Blocks

    Code::Blocks Project

    C

    2014/9/16 2

  • Code::Blocks

    Code::BlocksWindowsGNU/LinuxMac OS XUNIXC/C++

    IDEIntegrated Development Environment

    Visual StudioXcodeBorlandC++ BuilderDelphiEclipse

    2014/9/16 3

  • Code::Blocks

    http://www.codeblocks.org/downloads/26

    codeblocks-13.12mingw-setup.exe

    2014/9/16 4

    http://www.codeblocks.org/downloads/26

  • 2014/9/16 5

  • Project

    2014/9/16 6

  • Project

    console application project main.c

    empty project .c / .cpp

    2014/9/16 7

  • build -> run

    build

    2014/9/16 8

  • C

    Hello World

    // Hello.c

    #include //

    int main() //C

    {

    printf(Hello World!\n); //

    return 0;

    }

    2014/9/16 9

  • hello +

    char name[30] = {0};

    scanf(%s,name);

    2014/9/16 10

    gets(name); // #include

  • break pointdebug

    watch

    2014/9/16 11

  • main()

    {

    int a=5;

    printf("%d",A);

    }

    2014/9/16 12

  • Ca=1b=2

    a=1b=2

    2014/9/16 13

  • &int a,b;

    scanf("%d %d",a,b);

    Scanfabab&aa

    2014/9/16 14

  • %cscanf("%c%c%c",&c1,&c2,&c3);

    a b c

    ac1c2bc3%c

    2014/9/16 15

  • &scanf("%s",&str);

    Cscanf&scanf("%s",str);

    2014/9/16 16

  • Learn-C (beginner): http://www.learn-c.org/

    The C Programming Language Second Edition

    2014/9/16 17

    http://www.learn-c.org/

  • 2014/9/16 18