私が書いた;
Element element=new Element;
エラーが発生しました。
homework.cpp: In function 'int main(int, char**)':
homework.cpp:227:29: error: conversion from 'Element*' to non-scalar type 'Element' requested
*** 1 errors, 0 warnings
ポインターや要素の配列は必要ありません。
と書いたほうがいいのですがElement *element= new Element;
。説明する誰か?
編集:
要素クラス:
class Element{
public:
Element():exists(false){};
std::string name;
std::string full_path_name;
ElementType element_type;
long element_size;
bool exists;
};