Page MenuHomePhorge

Unit.cpp
No OneTemporary

Size
517 B
Referenced Files
None
Subscribers
None

Unit.cpp

#include "Unit.h"
#include <string.h>
#include <stdio.h>
unsigned int Unit :: num_of_units = 0;
Unit :: Unit() {
this->id = num_of_units;
num_of_units++;
set_name(NO_NAME);
}
Unit :: Unit(char* name) {
this->id = num_of_units;
num_of_units++;
set_name(name);
}
void Unit :: set_id(unsigned int id) {
this->id = id;
}
unsigned int Unit :: get_id() {
return this->id;
}
void Unit :: set_name(char* name) {
strncpy_s (this->name, name, MAX_LENGTH_NAME);
}
char* Unit :: get_name() {
return this->name;
}

File Metadata

Mime Type
text/x-c
Expires
Sat, Aug 29, 3:28 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
374889
Default Alt Text
Unit.cpp (517 B)

Event Timeline