Skip to content

Element

Mister Mjir edited this page Dec 23, 2019 · 1 revision

Element

The element struct.

Header (element.h)

#ifndef ELEMENT
#define ELEMENT

#include <string>

struct Element
{
  std::string name;
  std::string symbol;
  uint8_t atomicNumber;
  int8_t period;
  int8_t group;
  float electronegativity;
  short int radius;
};

#endif

Notes

Make sure you cast uint8_t and int8_t datatypes to int if you want to print them in std::cout or something, just remember that they are treated as chars.


V 2.2.0

Clone this wiki locally