Category:C

  • C / C + + Programming Notes: summary of inline function! C / C + + novice is worth collecting!

    Time:2020-9-21

    In C / C + +, in order to solve the problem that some frequently called small functions consume a lot of stack space (stack memory), the inline modifier is specially introduced, which is expressed as an inline function. Stack space refers to the memory space where local data (i.e. data within functions) of the […]

  • QT draws clock effect

    Time:2020-9-21

    sketch Qpainter provides the common operation of 2D drawing, and qtimer provides timer function. Combining the two, you can make a lot of custom special effects rendering. Next, to achieve a daily contact with things – the clock. Contains all the common functions: hour hand, minute hand, second hand. Implementation mode Since the clock is […]

  • Traversal of clue binary tree in C language

    Time:2020-9-20

    Read a lot of clues on the Internet, binary tree traversal process code: take a strict version of the textbook, copy directly sent to the Internet, some of the key code are not explained. I thought about it for a long time Now send out what I’m thinking about and share it! Let me talk […]

  • QT programming for small clock

    Time:2020-9-20

    Hello world! Learning programming language is the simplest and most classic small program, of course, QT is no exception. In learning drawing, I think writing a clock applet is also a good start. In the previous “MATLAB and Java hours” article, I also began to write clock programs as the beginning of learning drawing. The […]

  • 8. C language variable declaration and definition

    Time:2020-9-19

    Program ape has a stumbling block: if you write code without comments, JJ is as long as comments! In fact, good code style and programming habits, even without code comments, can make people appreciate (desire) heart (cry) happy (no) eyes (tears)!     If you want to practice this skill, you have to obey your […]

  • MFC dialog box to achieve the effect of the lantern

    Time:2020-9-19

    In this paper, we share the MFC dialog box to achieve the lantern, text information loop playback display effect, for your reference, the specific content is as follows Cmfcdlg. H dialog box //Cmfcdlg. H dialog box class CMFCDlg : public CDialogEx { //Structure public: Cmfcdlg (CWnd * pparent = nullptr); // standard constructor //Dialog data […]

  • C serial 5-functions and return

    Time:2020-9-18

    1、 Return statement 1. The main function has a return statement, but it can not. For the main function, after running the last line of statement, it will automatically return a 0, but other functions are not allowed. In order to form a good habit, please add return 0 at the end of the main […]

  • MFC for subtitle scrolling

    Time:2020-9-18

    In this paper, we share the MFC specific code for subtitle rolling effect, for your reference, the specific content is as follows 1. Create dialog box project This step is very simple, you can refer to my previous blog. Here you can first release the effect of my program. If it’s not what you need, […]

  • Single chain list

    Time:2020-9-17

    Realization of one way linked list Create 3 files: listsinglelinked. H, listsinglelinked. C, listsinglelinked test. C listSingleLinked.h #ifndef SINGLE_LINKED_H_ #define SINGLE_LINKED_H_ #ifdef __GNUC__ #define DEPRECATED __attribute__( (deprecated) ) #elif defined(_MSC_VER) #define DEPRECATED __declspec( deprecated ) #else #define DEPRECATED #endif #ifndef PTOI #define PTOI( p ) ((int32_t)(int64_t)(p)) #endif #ifndef ITOP #define ITOP( i ) ((void *)(int64_t)(i)) […]

  • MFC dialog box to achieve trapezoidal paging

    Time:2020-9-17

    This example for you to share MFC dialog box trapezoidal paging specific code, for your reference, the specific content is as follows //Mfcdlg. H: header file // #pragma once #include “CMemoCtrl.h” //Cmfcdlg dialog box class CMFCDlg : public CDialogEx { //Structure CMemoCtrl m_Memo; public: Cmfcdlg (CWnd * pparent = nullptr); // standard constructor //Dialog data […]

  • Double linked list

    Time:2020-9-16

    Realization of bidirectional linked list Create three files: listdoublelinnked. H, listdoublelinnked. C, doublelinnkedtest. C listDoubleLinked.h #ifndef DOUBLE_LINKED_H_ #define DOUBLE_LINKED_H_ #ifdef __GNUC__ #define DEPRECATED __attribute__( (deprecated) ) #elif defined(_MSC_VER) #define DEPRECATED __declspec( deprecated ) #else #define DEPRECATED #endif #ifndef PTOI #define PTOI( p ) ((int32_t)(int64_t)(p)) #endif #ifndef ITOP #define ITOP( i ) ((void *)(int64_t)(i)) #endif #define […]

  • C / C + + multi parameter function parameter calculation order and stack order example code

    Time:2020-9-16

    1、 Preface Today, when reading thinking in C + +, an example in the book has attracted my attention If you look at the semantics of this statement, you will find that you just use a simple substr function of string to push the resulting substring_ Back to strings. But when I read it, I […]