致命错误C1016:#if [n] def期望一个标识符

boo*_*oby 1 c++ compiler-errors

// File: Lab13Frac.h

#include <iostream>
using namespace std;
#ifndef "Lab13Frac.h"
#define "Lab13Frac.h"

// prototpes

#endif 
Run Code Online (Sandbox Code Playgroud)

In *_*ico 7

标识符不应该在引号中.此外,按惯例,它应该全部上限.

// File: Lab13Frac.h

#ifndef LAB13FRAC_H
#define LAB13FRAC_H

#include <iostream>
using namespace std;
// The above line is not recommended in header files
// because it may cause namespace collisions.
// See http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5

// Prototypes

#endif
Run Code Online (Sandbox Code Playgroud)

  • @Kotti:除了这些标识符是为编译器保留的.(保留任何以下划线开头,后跟另一个下划线或大写字母的名称.) (2认同)