Skip to content

Instantly share code, notes, and snippets.

#include "resistor.h"
double Resistor::defR = 1290;
Resistor::Resistor() : R(defR) {}
Resistor::Resistor(double r) : R(r) {}
void Resistor::setDef(double r) {
Resistor::defR = r;
#include "nem_oo.h"
void strcpy(char *dest, const char *source)
{
while((*dest++=*source++)!='\0');
}
unsigned int strlen(const char *str)
{
int lnko(int a, int b)
{
int bigger = (a>=b)?a:b, smaller = (a<=b)?a:b, ret=0, i;
for(i=1; i<=smaller; i++)
if(smaller%i==0 && bigger%i==0) ret = i;
return ret;
}