Bad Example: Package Import Order

#include<vector>
#include<iostream>
#include<stdio.h>
//If tuple.h is in front of common.h, the program will report an error, if it is placed in the back, it is normal.
//Indicate that the package is introduced in order, pay attention when using it
#include "tuple.h"
#include "common.h"

int main(){

    typedef Pair<char,int> t_pair;

    t_pair tp('a',1);

    std::cout << sizeof(tp) << std::endl;


    return 0;
}

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326357790&siteId=291194637